如何在无限极限之间绘制参数函数?

时间:2013-02-18 21:54:21

标签: matlab plot parametric-equations

如何使用matlab绘制具有无限限制的参数函数以获得圆?

x(t)=2t/(1+t.^2)
y(t)=(1-t.^2)/(1+t.^2)

1 个答案:

答案 0 :(得分:1)

我不知道无限的限制,但

%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)

给了我一个圆圈。然而,在(0,-1)附近仍然会有一个微小的差距。