Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Matlab
good evening , i'm working on some equation on matlab and i need to plot them in figures , i used this code
x=[0:9];
y=[0:9];
for w=1:10
    n=sqrt(x(1,w))+sqrt(y(1,w));
    z(1,w)=power(n,.5);
end
plot(x,z);
 

this one will plot the relation between z and x only .
how could i plot y too in the same equation ?
thank you
Posted 9-Jan-13 7:32am
Comments
Kiran Chandrashekhar at 28-Jan-13 21:33pm
   
Have you tried 'hold on;' plot(y,z). Is this what you were looking ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 379
1 Nirav Prabtani 266
2 Abhinav S 210
3 PIEBALDconsult 160
4 Dave Kreskowiak 155
0 OriginalGriff 7,545
1 Sergey Alexandrovich Kryukov 6,757
2 Maciej Los 3,909
3 Peter Leow 3,693
4 CHill60 2,712


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100