MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] 求解matlab编程时遇到语法问题的解决办法 (https://www.labfans.com/bbs/showthread.php?t=21003)

籽籽籽晴 2017-01-26 15:52

求解matlab编程时遇到语法问题的解决办法
 
ua=0:1:71;
N=length(ua);n=0;T=0;Ft=0;ad=0*ua;area=0*ua;
[COLOR="blue"]for[/COLOR] i=1:N
k=i;
[COLOR="blue"]if[/COLOR] ua(i)<=20
T=1146+0*ua(i);
[COLOR="blue"]else[/COLOR]
T=443.527-0.165465*(n2-4518.25)+0.0000360772*(n2-4518.25).^2-0.00000000361349*(n2-4518.25).^3;
[COLOR="blue"]end[/COLOR]
n=ua(i)*(im*i0/r)/0.377;
Ft=T*im*i0*Nt/r;
f=0.0076+0.000056*ua(i);
Fw=Cd*A*ua(i).^2/21.15;
D=(Ft-Fw)/G;
ad(i)=1.29/9.8*(D-f);
area(i)=0.01.*ad(i)/3.6;
AREA=area(1:k);
t(i)=sum(AREA);
[COLOR="Blue"]end[/COLOR]
[COLOR="Red"]In an assignment A(I) = B, the number of elements in B and I must be the same.[/COLOR]


所有时间均为北京时间。现在的时间是 04:01

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