Matlab plots data, not functions. So, you need to generate data that represents your function. Here I generate a vector containing 100 values of t from 0 to 1 (you could use linspace() for this if you prefer), then use it to generate the x, y, and z values:
t = [0 : 0.01 : 1]';
x = t;
y = t;
z = 2 * t.^2;
plot3(x,y,z, 'r-');
The plot3() call generates the plot as a red line connecting your x, y, z data points.
Matlab plots data, not functions. So, you need to generate data that represents your function. Here I generate a vector containing 100 values of
t
from 0 to 1 (you could use linspace() for this if you prefer), then use it to generate the x, y, and z values:The plot3() call generates the plot as a red line connecting your x, y, z data points.