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);
0 个评论
回答(1 个)
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 个评论
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 Exchange 中查找有关 Stress and Strain 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!