Failure in initial objective function evaluation. FSOLVE cannot continue.

4 次查看(过去 30 天)
function fval=lorenzsystem(X)
tetatw=-8;
lockno=5;
mumr=0.4;
lamda_mr=0.03;
lamda_tpp=0.03;
% beta0=X(1);
beta1c=X(1);
beta1s=X(2);
teta0=X(3);
teta1c=X(4);
teta1s=X(5);
fval(1,1)=beta1s-teta1c+((1.33*mumr*(lockno*(((teta0/8)*(1+mumr^2))+((tetatw/10)*(1+0.833*mumr^2))+((mumr/6)*teta1s)-(lamda_mr/6))))/(1+0.5*mumr^2));
fval(2,1)=beta1c+teta1s((2.66*mumr*(teta0-0.75*lamda_tpp+0.75*mumr*teta1s+0.75*tetatw))/(1-(0.5*mumr^2)));
end
Why am I getting an error? Thanks.
  2 个评论
Matt J
Matt J 2021-10-24
sefa arslan's original question reproduced below:
function fval=lorenzsystem(X)
tetatw=-8;
lockno=5;
mumr=0.4;
lamda_mr=0.03;
lamda_tpp=0.03;
% beta0=X(1);
beta1c=X(1);
beta1s=X(2);
teta0=X(3);
teta1c=X(4);
teta1s=X(5);
fval(1,1)=beta1s-teta1c+((1.33*mumr*(lockno*(((teta0/8)*(1+mumr^2))+((tetatw/10)*(1+0.833*mumr^2))+((mumr/6)*teta1s)-(lamda_mr/6))))/(1+0.5*mumr^2));
fval(2,1)=beta1c+teta1s((2.66*mumr*(teta0-0.75*lamda_tpp+0.75*mumr*teta1s+0.75*tetatw))/(1-(0.5*mumr^2)));
end
Why am I getting an error? Thanks.

请先登录,再进行评论。

采纳的回答

Matt J
Matt J 2021-10-23
Is there supposed to be a '+' after teta1s?
fval(2,1)=beta1c+teta1s+((2.66*mumr...

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Nonlinear Optimization 的更多信息

产品


版本

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by