fsolve solver formulation?

Is the problem well formulated to solve "nmax" equations with "nmax" unknowns with fsolve?
The equation is the following,
pot(1:nmax) = q./epsx(1:nmax) .* ( -get_n(x(1:nmax)) + Ndx(1:nmax) + get_p(x(1:nmax)) - Nax(1:nmax) ) + val_dxx_vv(1:nmax);
"x" is the initial guess array (1:nmax),
"get_n" and "get_p" are non-linear functions of "x", and the rest are all arrays. As you see this is the same equation, but I need to get a solution for every single "x".
Is this formulation ok with matlab, because the code keeps running indefinitely without returning anything. I also used a "drawnow" instruction to follow "x" as
figure(10)
hold on
plot(position,x)
drawnow
but the same "x" will be returned again and again.

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

Asked:

on 27 Apr 2016

Edited:

on 3 May 2016

Community Treasure Hunt

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

Start Hunting!