Help me to draw graphic for vector xyz :)
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (2)
Andrew
le 30 Juil 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
le 30 Juil 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 commentaires
Iain
le 30 Juil 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.
Voir également
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!