MATLAB Answers

How to plot a 2d parametric equation

216 views (last 30 days)
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.

  0 Comments

Sign in to comment.

Accepted Answer

KSSV
KSSV on 28 Sep 2016
N = 100 ;
t = linspace(0,1,N) ;
x=2*t+4 ;
y=t-1 ;
plot(x,t)

  1 Comment

MIGUEL HERNANDEZ
MIGUEL HERNANDEZ on 29 Sep 2016
Thanks! Could you tell me how to limit the graph to these values: -1<t<4 ?

Sign in to comment.

More Answers (0)