fsolve: Undefined function 'fsolve' for input arguments of type 'function_handle'.
12 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Nouhayla EL GHANI
il 3 Set 2015
Commentato: Star Strider
il 4 Set 2015
Hello ,
I'am trying to solve non linear problem, with f solve but I get always the error:
Undefined function 'fsolve' for input arguments of type 'function_handle'.
The code is:
function F=CL_tau_HS(t,x,Ga,lamda,sigmma_e,nu,e,ea,tau_p,P,k)
F[(x(3)/Ga)*cosh(lamda*x(1))+x(2)/Ga-sigma_e
x(4)-(x(5)/Ga)*2*lamda*sinh(lamda*x(1))
2*x(5)-(x(3)/Ga)*4*(lamda^2)*cosh(lamda*x(1))
x(5)*(1-x(1))+x(4)-(P/(E*t*ea))*(1+3*k*(1-(nu^2))*(1+(ea/e)))
(x(3)/(2*lamda))*sinh(lamda*x(1))+0.5*x(2)*x(1)+0.5*tau_p*(1-x(1))-0.5*P];
I call it in the main function using:
x0=[10 1 1 1 1];
const=fsolve(@(t,x)CL_tau_HS(t,x,Ga,lamda,sigmma_e,nu,e,ea,tau_p,P,k),x0)
Thanks :)
0 Commenti
Risposta accettata
Star Strider
il 3 Set 2015
The fsolve function is in the Optimization Toolbox. Be sure you have that toolbox.
Also, it wants functions that take one argument — the vector of variables you want it to solve for. Yours give it two to solve for, but I suspect that shouldn’t be throwing the error you see.
0 Commenti
Più risposte (1)
Nouhayla EL GHANI
il 4 Set 2015
1 Commento
Star Strider
il 4 Set 2015
The easiest way to see if you have it is to type ver in the Command Window. Your entire MATLAB installation information will be displayed in the result, so if you have the Optimization Toolbox, it will be listed.
If you don’t have it, and you have a university license, ask the person who controls that license. Otherwise, you will have to buy the toolbox. Contact MathWorks for that.
Vedere anche
Categorie
Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!