Using fsolve with vector as argument
Mostrar comentarios más antiguos
Hi all. I have to solve a system of nonlinear equations many times for different parameters values. For example:
function F = root2d(x,a)
F(1) = exp(-exp(-x(1)+x(2))) - x(2)*(1+x(1)^2);
F(2) = x(1)*cos(x(2)) + x(2)*sin(x(1)) - a;
I would like to solve for a = [0 1]. So:
a = [0 1]
fun = @(x) root2d(x,a);
x0 = [0,0];
x = fsolve(fun,x0)
But this is not feasible because of the different dimension of a. Is there anyway to compute this without using loops for each value of a?. Thank you very much.
Respuestas (0)
Categorías
Más información sobre Systems of Nonlinear Equations en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!