フィルターのクリア

How to plot a 2d parametric equation

128 ビュー (過去 30 日間)
MIGUEL HERNANDEZ
MIGUEL HERNANDEZ 2016 年 9 月 28 日
編集済み: Rachel A. Eaglin 2021 年 2 月 19 日
Equation is x=2t+4, y=t-1
This is what I did:
t=(1:5)
x=2t+4
t=t-1
plot (x,y)
And I obtained a diagonal line.
Note: t=(1:5) is not part of the exercise, I just added to see what could happen.

採用された回答

KSSV
KSSV 2016 年 9 月 28 日
N = 100 ;
t = linspace(0,1,N) ;
x=2*t+4 ;
y=t-1 ;
plot(x,t)
  2 件のコメント
MIGUEL HERNANDEZ
MIGUEL HERNANDEZ 2016 年 9 月 29 日
Thanks! Could you tell me how to limit the graph to these values: -1<t<4 ?
Rachel A. Eaglin
Rachel A. Eaglin 2021 年 2 月 19 日
編集済み: Rachel A. Eaglin 2021 年 2 月 19 日
You can write this on the line after the plot() command
ylim([-1 4]);

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by