我有10個非線性方程式,如何使用MATLAB找到非線性代數方程的解?
L1 + 1.3*3*(P1^0.3) + 2*P1 = 12
L2 + 1.2*5*(P2^0.2) + 3*P2 = 20
L3 + 1.15*6*(P3^0.15) + 5*P3 = 28
L4 - L1*0.9*0.4*(X1^-0.1) = 0
L4 - L2*0.8*0.5*(X2^-0.2) = 0
L4 - L3*0.7*0.6*(X3^-0.3) = 0
P1 - 0.4*(X1^0.9) = 0
P2 - 0.5*(X2^0.8) = 0
P3 - 0.6*(X3^0.7) = 0
X1 + X2 + X3 = 10
我沒有用於解決任何初始估計值,但是,所有的變量基本上是非負即
L1> 0,L2 > 0,L3> 0,L4> 0,P1> 0,P2> 0,P3> 0,X1> 0,X2> 0,X3> 0
我試圖通過執行以下命令,
clear
clc
syms L1 L2 L3 L4 P1 P2 P3 X1 X2 X3
sol=solve([ L1 + 1.3*3*(P1^0.3) + 2*P1 == 12, L2 + 1.2*5*(P2^0.2) + 3*P2 == 20, L3 + 1.15*6*(P3^0.15) + 5*P3 == 28, ...
L4 - L1*0.9*0.4*(X1^-0.1) == 0, L4 - L2*0.8*0.5*(X2^-0.2) == 0, L4 - L3*0.7*0.6*(X3^-0.3) == 0, ...
P1 - 0.4*(X1^0.9) == 0, P2 - 0.5*(X2^0.8) == 0, P3 - 0.6*(X3^0.7) ==0, X1+X2 +X3 == 10, ...
L1>0, L2>0, L3>0, L4>0, P1>0, P2>0, P3>0, X1>0, X2>0, X3>0], [L1, L2, L3, L4, P1, P2, P3, X1, X2, X3]);
但它顯示誤差
Warning: 32 equations in 11 variables.
> In C:\Program Files\MATLAB\R2013a\toolbox\symbolic\symbolic\symengine.p>symengine at 56
In mupadengine.mupadengine>mupadengine.evalin at 97
In mupadengine.mupadengine>mupadengine.feval at 150
In solve at 170
Warning: Explicit solution could not be found.
> In solve at 179
>>
如何解決這些非線性方程?
更新:DIFF實際上是一個數字的差異,比如 10,20或30.我從這裏刪除了DIFF。
看看[this](https://nl.mathworks.com/matlabcentral/answers/60852-warning-explicit-solution-could-not-be-found)問題。也許你必須檢查你的問題。 –