fsolve solver formulation?

7 次查看(过去 30 天)
tonton
tonton 2016-4-27
编辑: tonton 2016-5-3
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.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by