Problem with initial guess of a nonlinear system using fsolve
Show older comments
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 Comment
niccolò guazzi
on 19 May 2019
Edited: niccolò guazzi
on 19 May 2019
Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!