From: patti on
Hello,
how could i plot 2 graphs in on plot?
I use only the handle for speed up :-).
I want somthing like that:
hold on;
plot(x1,y1);
plot(x2,y2);
hold off;

But that:
hold on;
set(handles.plot1_m, 'XData',x1 ,'YData', y1);
set(handles.plot1_m, 'XData',x2 ,'YData', y2);
hold off;

doesn't function...

Please help me...
From: Justus Skorps on
I guess is must be something like
> set(handles.plot1_m, 'XData',xx ,'YData', yy);
with xx and yy being cell arrays like xx = {x1,x2} and yy = {y1,y2}
(I am not sure about the syntax to define cell arrays and have not
Matlab available atm)...

From: patti on
Hi Justus,
perfect that is the solution !!! Thausend thanks from Germany :-)
From: patti on
n = 0
m = tan(57.5)
xw2_l = 0:01:strecke_l;
yw2_l = m*xw2_l + n
Now i have a big problem that u can't give every line an own color.
And the plot conected all lines together...
What coudl i do?

xw2_l = xw2_l -5;
xw2_l = -xw2_l

n = 0
m = tan(57.5)
xw2_r = 0:01:strecke_l;
yw2_r = m*xw2_r + n
xw2_r = xw2_r +5;

xx=[xw2_l,xw2_r];
yy=[yw2_l,yw2_r];


set(handles.plot1_m,'XData',xx ,'YData',yy,'Color','red','LineWidth',1)