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=1739)

erickwork 2008-03-18 10:32

【求助】图形显示不正确
 
y=x-2*0.00000033*[3.3/(15*0.8^2)+x*10^6]^4/{0.4*(1-0.4)*[(1-0.4)*3.3/(15*0.8^2)+(1-0.4)*x*10^6+(0.4-0.5)*10^6*x]}^2
刚起步搞matlab,这个是书上的例题,可是出来的波形不符合。估计我是写错程序了,哪位高手指点一下:lovely:

zhiwei 2008-03-19 00:23

>> y=x-2*0.00000033*[3.3/(15*0.8^2)+x*10^6]^4/{0.4*(1-0.4)*[(1-0.4)*3.3/(15*0.8^2)+(1-0.4)*x*10^6+(0.4-0.5)*10^6*x]}^2
??? Undefined function or variable 'x'.

chexa 2008-03-25 16:36

syms x
y=x-2*0.00000033*(3.3/(1.5*0.8^2+x*10^6))^4/(0.4*(1-0.4)*((((1-0.4)*3.3)/(15*0.8^2))+(1-0.4)*x*10^6+(0.4-0.5)*10^6*x))
ezplot(y)

这个你试一下,出来的是条直线。

mathjiang 2008-03-25 20:44

楼主注意了,除了数组和元包,其他地方不能有中括号“[]”和大括号“{}”。
:biggrin:


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

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