Help me to draw graphic for vector xyz :)

조회 수: 7 (최근 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 CenterFile Exchange에서 Creating, 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