Plotting parabolas and curves on MATLAB

I want to graph the parabola r(t) = ti + t^2j for −2 ≤ t ≤ 2 and the curve r(t) = ti + t^2/2j + t^3/3k for −2 ≤ t ≤ 2.
I've never done MATLAB before and am very confused as to how to get this done.

回答(1 个)

Consider i, j, k as x, y, z and then look at
doc meshgrid doc ndgrid
with new eyes.
For starters
>> t=meshgrid(-2:2,-2:2)
t =
-2 -1 0 1 2
-2 -1 0 1 2
-2 -1 0 1 2
-2 -1 0 1 2
-2 -1 0 1 2
>> r1=t+t.^2;
>> surf(-2:2,-2:2,r1)

类别

在 帮助中心 和 File Exchange 中查找有关 2-D and 3-D Plots 的更多信息

提问:

2015-3-16

回答:

dpb
2015-3-16

Community Treasure Hunt

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

Start Hunting!

Translated by