how to fix error occurred converting from tf to double:

7 ビュー (過去 30 日間)
metasebia dabi
metasebia dabi 2021 年 4 月 26 日
コメント済み: Walter Roberson 2021 年 5 月 2 日
The following error occurred converting from tf to double:
Conversion to double from tf is not possible.
Error in constrValidate (line 55)
Iterate.cineq(:) = cineq;
Error in gacommon (line 125)
[LinearConstr, Iterate,nineqcstr,neqcstr,ncstr] = constrValidate(NonconFcn, ...
Error in gamultiobj (line 289)
~,options] = gacommon(nvars,fun,Aineq,bineq,Aeq,beq,lb,ub,nonlcon,[],options,user_options);

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 4 月 27 日
It looks like your nonlinear inequality constraints use tf() and try to return the tf(). If you need to use tf() in your computation, rememberthat you need to invoke the transfer function on data, or you need to do something like bode().
tf() is most typically used to create vectors, rather than being evaluated at a single point, so you might need some work in condensing the vector of results into a small number of constraints.
  3 件のコメント
metasebia dabi
metasebia dabi 2021 年 5 月 2 日
how do i invoke the transfer function on data, or do something like bode().
Walter Roberson
Walter Roberson 2021 年 5 月 2 日
Look right near the end
Cineq=[sqrt(M/(0.27*W*fc))-x(1),ftop-fa,fcsb-0.45*fc,fbot-0.5*((fc)^0.5),fbot-fta,Asmin-As,tf-C,0.65-B1,Lpf-Lpa,0.5*fpu-fps, C/de-0.42,0.005-et,Mr-Mn,abs((Vu-Vp)*dv)-Mu,Vs-VS,Vu/q-Vn,(abs(Mu)/dv*qf)+(abs((Vu/qv)-Vp)-0.5*Vs)*cot(tt)-(Aps*fps+As*fy)*DT-L/360,0.5*q*(Vc+Vp)-Vu,Vu/q-Vn,fpe-0.8*fpy];
^^
tf is Transfer Function from the Control System toolbox.
I do not see anything similar enough in the variables to be able to guess what you really wanted instead.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStress and Strain についてさらに検索

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by