MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]画图问题 (https://www.labfans.com/bbs/showthread.php?t=6905)

雪龙飞 2009-03-18 01:28

[求助]画图问题
 
x=-50:0.1:50;
r=0.05;
e=50;
y=((2*e*r+2*r^2)/((i*x*r)-e^2))-1+2*x*r/((i*x*r)*(-i*x*r)-e^2);
plot(x,y);
老报错,是不是复数i不能用在分母上,那该怎么画这个方程(y=……)的图了?

zhyanchao 2009-03-18 11:12

回复: [求助]画图问题
 
x=-50:0.1:50;
r=0.05;
e=50;
y=((2*e*r+2*r^2)./((i*x*r)-e^2))-1+2*x*r./((i*x*r).*(-i*x*r)-e^2);
plot(x,y)
你的y出现了问题。另外,y是个复数,不能这样画图的。不懂你画图的具体含义,你可以在看看复数画图的函数


所有时间均为北京时间。现在的时间是 11:12

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.