plot
,
ezplot
and plotting 3D curves with plot3
,
tubeplot3
, ezplot3
.
Note: You
must download the files tubeplot3.m
,
nice3d.m
and put them in the same directory
as your m-files.
Example for plotting 2D
curve r(t) = (t2, t3) for
t in [-1,1] with plot
tv = -1:.01:1;
% must use .* ./ .^ instead of * / ^
xv = tv.^2;
yv = tv.^3;
plot(xv,yv); axis equal
Example for plotting 3D
curve r(t) = (t, t2, t3)
for t in [-1,1] with tubeplot3
tv = -1:.01:1;
xv = tv;
yv = tv.^2;
% must use .* ./ .^ instead of * / ^
zv = tv.^3;
tubeplot3(xv,yv,zv); nice3d