필터 지우기
필터 지우기

Symbolic Solver: Mupad error, index out of range

조회 수: 1 (최근 30일)
Matthew Wade
Matthew Wade 2014년 8월 15일
답변: Walter Roberson 2018년 6월 12일
Hi,
I have a tricky system of ODEs that I would like to find a solution using symbolic solver.
The set of equations are as follows:
I2=1/(1+(S2/kih));
f1=(kmch*S2/(ksh2c+S2))*(S0/(ksch+S0));
f2=(kmph*S1/(ksph+S1))*I2;
f3=kmh2*S2/(ksh2+S2);
eq1=DD*(Subin-S0)-f1*X0;
eq2=-DD*X0+Ych*f1*X0-kdec*X0;
eq3=-DD*S1+(224/208)*(1-Ych)*f1*X0-f2*X1;
eq4=-DD*X1+Yph*f2*X1-kdec*X1;
eq5=DD*(Hydin-S2)-(16/208)*f1*X0+(32/224)*(1-Yph)*f2*X1;
where X0,X1,S0,S1,S2 are the variables and DD and Subin are parameters I would like to find an explicit solution for - i.e. DD=f(Subin). Whilst this is possible with six equations (a different steady-state condition), it does not seem possible with these five equations.
When I try the standard solver:
syst=solve([eq1,eq2,eq3,eq4,eq5],[S0,S1,X0,X1,X2]);
I get this error message:
Error using mupadengine/feval (line 157)
MuPAD error: Error: The row index is out of range.
Error in solve (line 354)
varargout{1}.(char(vars(i))) = transpose(eng.feval('map', solutions, '_index', i));
I suppose this means that no explicit solution can be found, but can find no reference to the error in online documentation.
I have also tried solving by finding solutions for S2 (from eq2 and eq4), X1 (from eq3 and eq5) and X0 from eq1. Subsequently substituting these solutions into the equations to find S1 and then S0 results in incredibly complex forms of equations. I am guessing there is a method for solving these type of problems, and if anyone could point me in the right direction, it would be much appreciated.
Regards Matt

답변 (1개)

Walter Roberson
Walter Roberson 2018년 6월 12일
You cannot solve for X2: your equations do not use X2.
Solving for X0, X1, S0, S1, S2 is going to give you expressions for those variables in terms of DD and Subin and the other variables; unless you have another equation as well, you are not going to be able to calculate DD in terms of Subin.

카테고리

Help CenterFile Exchange에서 Numeric Solvers에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by