문제

How to plot these parametric functions with infinite limits to get a circle using matlab?

x(t)=2t/(1+t.^2)
y(t)=(1-t.^2)/(1+t.^2)
도움이 되었습니까?

해결책

I don't know about infinite limits but

%Construct a vector of t ranging from a very small number to a very large number
t = -1000:0.1:1000; 

%Create x and y vectors based on your formula (with a couple of extra dots for element wise division)
x =2*t./(1+t.^2);
y =(1-t.^2)./(1+t.^2);

%Just normal plotting now
plot(x,y)

gives me a circle. There will still be a tiny gap around (0, -1) however.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top