solving non linear equation
Mostra commenti meno recenti
how can i return a vector as a solution?
I want back a number of roots equal to the number of values of t
syms S
>> myfun = @(S,t) 0.17*((S/10.8)+(S/21.6*sqrt(1+16*((S/5.4)^2))+((1/16)*log((4*S/5.4)+sqrt(1+(16*(S/5.4)^2))))))- t
>> t = linspace(0,2.6,10)
>> fun = @(S) myfun(S,t)
S = fzero(fun,0.03)
The program return this error:
Operands to the || and && operators must be convertible to logical scalar values.
Error in fzero (line 327)
elseif ~isfinite(fx) || ~isreal(fx)
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Calculus in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!