Help me to draw graphic for vector xyz :)
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Well, can someone here help me to draw a vector graphic ? it needs to use x, y, z graphic (3d one) and the function will be : r(t)=5t^2i - 2tj + 20z m; where the t will start from 0 until 1 (0, 0.01, 0.02, 0.03, ... , 1). For example : if the t=0 then the r(t) will on (0, 0, 2) and so on. Thanks and sorry for the bad English.
0 Kommentare
Antworten (2)
Andrew
am 30 Jul. 2013
Dear Utau,
I think you should create three variables x,y,z. x=5t^2i; y=-2tj; and z=20zm;
Then use function mesh, surf or plot3, or some else (I don't remember, but you'll find them in the Help).
I hope that will help you!
Iain
am 30 Jul. 2013
t = 0:0.01:10
x = 5*t.^2;
y = -2*t;
z = 2;
plot3(x,y,z)
Make sure you get x, y and z correct ;)
2 Kommentare
Iain
am 30 Jul. 2013
It plots a single line. Try executing the following code to get an example 3D vector
t = 0:0.01:10;
x = sin(2*pi*4*t); %A sine wave @ 4Hz
y = cos(2*pi*4*t); % A cosine wave @4 Hz
z = t; %
plot3(x,y,z) % This line DRAWS the line I just made up - All of it.
Are you trying to achieve something else?
Then, you should click the rotate button and rotate the thing that you just plotted.
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!