1
votes

Currently I am developing a game that use vector valued functions quite extensively and I want to take look at the graph of the functions before I put their equation into my game code.

Can someone explain me how do I graph a 3D Vector Valued Function in MATLAB?
(For Example: (Helix function) r(t) = 4 cos(t) * I + 4 * sin(t) * J + t * K)

Much Thanks.

1
using plot3 function is my first shoot. An image, even handmade one, can show what you really want. - Crowley

1 Answers

3
votes

you can use ezplot3, for example

ezplot3('4*cos(t)','4*sin(t)','t',[0,6*pi])

enter image description here

Another option is is plot3:

t = 0:pi/50:6*pi;
st = 4*sin(t);
ct = 4*cos(t);

plot3(st,ct,t)