How to realize matlab Curve folding
This article focuses on "how to achieve matlab curve folding", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to fold the matlab curve.
Curve folding
Clear
Close all
% normal drawing
Xcircle 0POS 0.005PUR 5
Y=exp (- 6cm x). * sin (x x 40) * 6+exp (5x) * 5e-11.*sin (x x 20)
Figure (1)
For iTunes 1 purl 2
A (I) = subplot (2pr 1pl I)
Title ('Before')
Plot (x _ journal _ y _ r _ x _ e _ 2 _ r _ o')
Grid on
Title ('Before')
Legend ('axiomatics 2')
Xlim ([0 5])
End
Drawnow
Cutout (a (2), 1dy4, 0.2)
Fold 1 to 4 parts of a (2) into dashed segments of length 0.2
Title ('After')
The function of a folding curve
Function cutout (axes_handle,Start,End,Gap)
Xt=axes_handle.XTick
Xl=axes_handle.XLim
P=allchild (axes_handle)
Px= {p.XData}
Py= {p.YData}
Leg=findobj (axes_handle.Parent,'Tag','legend')
[leg.AutoUpdate] = deal ('off')
Kolor= {p.Color}
Hold on
For i=1:length (p)
P (I) .XData = px {I} (1:find (px {I} > = Start,1))
P (I) .YData = py {I} (1:find (px {I} > = Start,1))
X {I} = px {I} (find (px {I} > = End,1): end)-End+Start+Gap
Y {I} = py {I} (find (px {I} > = End,1): end)
Pl (end:) = plot (x {I}, y {I}, [p (I) .XData (end) x {I} (1)], [p (I) .YData (end) y {I} (1)],...
'Color',kolor {I})
Pl (iPol 2). LineStyle=':'
Pl (iMagne 1) .Marker = p (I) .Marker
Pl (iMagne 1) .MarkerSize = p (I) .MarkerSize
Pl (iJournal 1) .LineWidth = p (I) .LineWidth
End
Hold off
Xta=xt (1:find (xt > = Start))
Xta (end) = Start
Xtb=xt (find (xt > End): end)
Xtb= [End xtb]
XtL= [xta xtb]
Xt2= [xta xtb-End+Start+Gap]
Axes_handle.XTick=xt2
Axes_handle.XTickLabel=xtL
Axes_handle.XLim= [XL (1) xl (2)-End+Start+Gap]
At this point, I believe that everyone on the "matlab curve folding how to achieve" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!