Help me to draw graphic for vector xyz :)

2 ビュー (過去 30 日間)
UtauYuiki
UtauYuiki 2013 年 7 月 30 日
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.

回答 (2 件)

Andrew
Andrew 2013 年 7 月 30 日
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 件のコメント
UtauYuiki
UtauYuiki 2013 年 7 月 30 日
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 2013 年 7 月 30 日
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 件のコメント
UtauYuiki
UtauYuiki 2013 年 7 月 30 日
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 2013 年 7 月 30 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by