how to fix error occurred converting from tf to double:

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Stress and Strain 的更多信息

标签

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by