Info
この質問は閉じられています。 編集または回答するには再度開いてください。
System of nonlinear equations
1 回表示 (過去 30 日間)
古いコメントを表示
I have designed a code for a system of two nonlinear equation (code given). I have tried 'fsolve' to find the solutions. But I am getting the 'No Solution found' message. Can anyone please let me know how to fix it or what approach should I take to solve this set of equation? Thanks
clear all, close all, clc
gs = [10e12 99e15];
[N,fval,exit,output] = fsolve(@Density,gs);
N
fval
Density(gs)
exit
output
function nNonlin = Density (z)
Ns0 = z(1);
Nt0 = z(2);
k_rs = 3.2e7;
k_ISC = 3.1e7;
k_RISC = 5.6e3;
k_ST = 2e-11;
k_TT = 5e-15;
k_NRT = 8.2e2;
J = 0.1;
d = 15e-7;
e = 1.6e-19;
nNonlin(1) = -(k_rs+k_ISC)*Ns0+k_RISC*Nt0-k_ST*Ns0*Nt0+0.25*k_TT*Nt0.^2+J/(4*d*e);
nNonlin(2) = k_ISC*Ns0-(k_RISC+k_NRT)*Nt0-1.25*k_TT*Nt0.^2+(3*J)/(4*d*e);
end
0 件のコメント
回答 (1 件)
Walter Roberson
2019 年 1 月 30 日
The equation is a cubic. In all three solutions, z(1) is complex valued. In two of the three solutions, z(2) is real-valued, and in the third it is complex-valued.
fsolve() in earlier releases could only handle real-valued equations; even in later releases it can fail on complex-valued equations.
1 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!