Filter löschen
Filter löschen

Help me to draw graphic for vector xyz :)

5 Ansichten (letzte 30 Tage)
UtauYuiki
UtauYuiki am 30 Jul. 2013
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.

Antworten (2)

Andrew
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!
  1 Kommentar
UtauYuiki
UtauYuiki am 30 Jul. 2013
Well, thanks for the answer, but I still cannot understand well, can you help me to draw it or something, so maybe I can understand from the picture. Sorry for asking too much :)

Melden Sie sich an, um zu kommentieren.


Iain
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
UtauYuiki
UtauYuiki am 30 Jul. 2013
Well, thanks for the answer, but I still cannot understand well, can you help me to draw it or something, so maybe I can understand from the picture. Sorry for asking too much :)
Iain
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.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by