Parametric Function does not show up in plot?

I am attempting to plot the Folium of Descartes in Matlab as a set of parametric equations, but when I use the plot(x,y) command no plot shows up--just an empty plot with no lines or points.
These are my commands I am using--hopefully someone can point out any mistakes I may have made.
clc
syms t
t=linspace(-30, 40);
x=3*t/(1+t.^3);
y=3*(t.^2)/(1+t.^3);
plot(x,y)

답변 (1개)

Star Strider
Star Strider 2014년 10월 21일

2 개 추천

You don’t need syms but you do need to vectorise the division (replace (/) with (./)):
t=linspace(-30, 40);
x=3*t./(1+t.^3);
y=3*(t.^2)./(1+t.^3);
plot(x,y)

댓글 수: 4

Devon
Devon 2014년 10월 21일
This worked beautifully, thank you!
Star Strider
Star Strider 2014년 10월 21일
My pleasure!
The sincerest expression of appreciation here on MATLAB Answers is to Accept the answer that most closely solves your problem.
Image Analyst
Image Analyst 2014년 10월 22일
You can also Vote for it, like I did.
Star Strider
Star Strider 2014년 10월 22일
Thank you, I A!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2014년 10월 21일

댓글:

2014년 10월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by