# how to fix error occurred converting from tf to double:

5 visualizzazioni (ultimi 30 giorni)
metasebia dabi il 26 Apr 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);
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposte (1)

Walter Roberson il 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.
##### 3 CommentiMostra 1 commento meno recenteNascondi 1 commento meno recente
metasebia dabi il 2 Mag 2021
how do i invoke the transfer function on data, or do something like bode().
Walter Roberson il 2 Mag 2021
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.

Accedi per commentare.

### Categorie

Scopri di più su Stress and Strain in Help Center e File Exchange

R2018a

### Community Treasure Hunt

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

Start Hunting!

Translated by