Borrar filtros
Borrar filtros

Incorrect number or types of inputs and outputs for function 'isfinite'

38 visualizaciones (últimos 30 días)
I want to solve this nonlinear system, but it always says in red: Incorrect number or types of inputs and outputs for function 'isfinite', and I'm a beginner I don't know how to fix it.
Could you please give me some advice? Thx.
x=fsolve('@system',[0 0])
Incorrect number or types of inputs or outputs for function 'isfinite'.

Error in fsolve (line 306)
if any(~isfinite(fuser))
function f=system(x)
f=[2*x(1)+x(2)+x(1)^3; x(1)+x(1)*x(2)+exp(x(1))];
end

Respuesta aceptada

Florian Bidaud
Florian Bidaud el 7 de Sept. de 2023
Editada: Florian Bidaud el 7 de Sept. de 2023
You need to remove the quotes
x=fsolve(@system,[0 0])
Equation solved. fsolve completed because the vector of function values is near zero as measured by the value of the function tolerance, and the problem appears regular as measured by the gradient.
x = 1×2
-0.3783 0.8108
function f=system(x)
f=[2*x(1)+x(2)+x(1)^3; x(1)+x(1)*x(2)+exp(x(1))];
end

Más respuestas (0)

Categorías

Más información sobre Biotech and Pharmaceutical en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by