Afficher commentaires plus anciens
各位大虾,本人想用fsolve函数求解非线性方程:x=0.412-0.412*(6.978e-5)^2/((4.343e-8)*(0.58-1.515-0.258*x))-(7.043e-14)*(exp(19.32*(1.515+0.258*x))-1)-(1.515+0.258*x)/5,首先保存一个Fun1.m文件:
function F=Fun1(x)F=0.412-0.412*(6.978e-5)^2/((4.343e-8)*(0.58-1.515-0.258*x))-(7.043e-14)*(exp(19.32*(1.515+0.258*x))-1)-(1.515+0.258*x)/5-x;
然后在matlab命令行输入:
X0=0.0158;
X=fsolve('Fun1',X0),F=Fun1(X)
结果报错:Error using feval
Undefined function 'Fun1' for input arguments of type 'double'.
Error in fsolve (line 241)
fuser = feval(funfcn{3},x,varargin{:});
Caused by:
Failure in initial user-supplied objective function evaluation. FSOLVE cannot continue.
请问各位大神是怎么回事啊,求指导啊!!灰常感谢!!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 非线性方程组 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!