how to fix error occurred converting from tf to double:
5 views (last 30 days)
Show older comments
metasebia dabi on 26 Apr 2021
Commented: Walter Roberson on 2 May 2021
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);
Walter Roberson on 27 Apr 2021
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.
Walter Roberson on 2 May 2021
Look right near the end
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.
Find more on Subclass Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!