
Re: plotting many functions on the same screen
Posted:
Jun 2, 2011 3:38 PM


On Jun 2, 3:20 pm, "Mohammad " <jab...@uni.uiuc.edu> wrote: > for i=1:5 > t=linspace(0,2*pi,100); > x= ellipseperpoint(i,1)+ellipseperpoint(i,4)*cos(tellipseperpoint(i,3)); > y= ellipseperpoint(i,2)+ellipseperpoint(i,5)*sin(tellipseperpoint(i,3)); > plot(x,y); > end > > I have 5 parametrix functions of x and y that I want to plot on the same screen. My current loop replaces each previous function such that only the last parametric equation lasts. Is there an easy way to avaoid this without hardwiring all five equations on the screen. > > Thanks! > > Cordially, Mohammad
Right before the "end" statement put "if i == 1, hold on; end"
Read the documentation on "hold"
Jim

