필터 지우기
필터 지우기

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 CenterFile Exchange에서 2-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