Problem with initial guess of a nonlinear system using fsolve
Mostrar comentarios más antiguos
Dear all, actually I’m dealing with a problem involving the solution of a nonlinear system. I’m recicling the lines I wrote above for the solution of an implicit equation so:
f=@(x) myfun(x,k1,k2...) With k constants. [x]=fsolve(f,x0)
With myfun: Function F=myfun(x,k1,k2,...)
..some passages..
F(1)=implicit eq.
It works fine. If I use the same form to solve a system:
f=@(x,y) myfun(x,y,k1,k2...) With k constants.
x0y0=[x0,y0] [x,y]=fsolve(f,x0y0)
With myfun:
Function F=myfun(x,y,k1,k2,...)
..some passages..
F(1)=funct(x,y) F(2)=funct(x,y)
I get an error, and it is due to the fact that the vector of inital guess gives problem. I also tried writing fsolve(f,x0,y0) but only x0 is read as initial guess, while y0 is read as option (a structure). Could you suggest me how to fix this problem? Thanks in advance, Niccolò
1 comentario
niccolò guazzi
el 19 de Mayo de 2019
Editada: niccolò guazzi
el 19 de Mayo de 2019
Respuestas (0)
Categorías
Más información sobre Least Squares 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!