Error: Function definitions are not permitted at the prompt or in scripts.function Uamax=Uamax(Ua4)r=0.367; nt=0.85; f=0.013; CA=2.77; io=5.83; m=3880; g=9.8;ig4=1; n=Ua4.*ig4.*io./(0.377.*r);Tq=-19.313+295.27.*n./1000-165.44.*(n./1000).^2+40.874.*

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 06:44:01
Error:Functiondefinitionsarenotpermittedatthepromptorinscripts.functionUamax=Uamax(Ua4)r=0.367;nt=0.

Error: Function definitions are not permitted at the prompt or in scripts.function Uamax=Uamax(Ua4)r=0.367; nt=0.85; f=0.013; CA=2.77; io=5.83; m=3880; g=9.8;ig4=1; n=Ua4.*ig4.*io./(0.377.*r);Tq=-19.313+295.27.*n./1000-165.44.*(n./1000).^2+40.874.*
Error: Function definitions are not permitted at the prompt or in scripts.
function Uamax=Uamax(Ua4)
r=0.367; nt=0.85; f=0.013; CA=2.77; io=5.83; m=3880; g=9.8;ig4=1; n=Ua4.*ig4.*io./(0.377.*r);
Tq=-19.313+295.27.*n./1000-165.44.*(n./1000).^2+40.874.*(n./1000).^3-3.8445.*(n./1000).^4;
Ft4=Tq.*ig4.*io.*nt./r;
Fr=m.*g.*f+(CA/21.15).*Ua4.^2;
Uamax=Ft4-Fr;
x=fzero(@Uamax,90) 求高手们帮助一下

Error: Function definitions are not permitted at the prompt or in scripts.function Uamax=Uamax(Ua4)r=0.367; nt=0.85; f=0.013; CA=2.77; io=5.83; m=3880; g=9.8;ig4=1; n=Ua4.*ig4.*io./(0.377.*r);Tq=-19.313+295.27.*n./1000-165.44.*(n./1000).^2+40.874.*
script 和function 都可以是m文件.
function 可以被以function 开始的m文件调用,
但不能被script调用,以非function 关键字开始