Error using sym/subsindex (line 1555) Indexing input must be numeric, logical or ':'.
1 回表示 (過去 30 日間)
古いコメントを表示
I tried to solve a system of non liniear equations and generate a steady state curve. I kept getting the message: " Error using sym/subsindex (line 1555) Indexing input must be numeric, logical or ':'.
Error in Steadystate (line 53) [x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11]= solve(..."
Here is the part where I kept getting a wrong message and everything was not definied as symbols in here is a constant being specified before:
syms x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 positive
%x1=Qs x2=Ql x3=Qar/qa x4=X x5=Xar x6=i(extracellular) x7=c
%x8=I(intracellular) x9=C x10=PrgB x11=loopO
%x12=donor density x13=recipient density
[x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11]= solve(...
x10==value,...pick a value for PrgB
x11==N*x8^4/(x8^4+Kb*x9^4),...
x1*(lamQs+muD)==(kPqloop*x11+kPqunloop*(N-x11))*(Kq*x5)/(1+Kq*x5),...
x2*(lamQl+muD)==(kPqloop*x11+kPqunloop*(N-x11))/(1+Kq*x5),...
x3*(lamQar+muD+kar*x5+kar*x4)==kPqloop*x11+kPqunloop*(N-x11),...
x4*(lamX+muD+kar*x3)==kxloop*x11+kxunloop*(N-x11),...
x5*(lamXar+muD+kar*x3)==kXarloop*x11+kXarunloop*(N-x11)-...
(kPqloop*x11+kPqunloop*(N-x11))*(Kq*x5(1+Kq*x5),...
x6*lameI==ki*(x1+x2)*DDensity-kTi(x6-x8)*DDensity,...
x8*(lamiI+muD)==kTi*(x6-x8),...
x9*(lamiC+muD)==kTc*(x7-x9),...
x10*(lamPrgB+muD)==kdown*x2,...
x1, x2, x3, x4, x5 ,x6, x7, x8, x9, x10, x11, 'Real',true);
Please help
Thanks, Vu
0 件のコメント
回答 (1 件)
Geoff Hayes
2014 年 7 月 29 日
Vu - take a look at the following two lines of code
(kPqloop*x11+kPqunloop*(N-x11))*(Kq*x5(1+Kq*x5),...
x6*lameI==ki*(x1+x2)*DDensity-kTi(x6-x8)*DDensity,…
Note in particular from the first line
x5(1+Kq*x5)
and from the second
kTi(x6-x8)
I suspect that you are missing an operator between the variable and the open bracket which most likely explains the Error using sym/subsindex (line 1555) Indexing input must be numeric, logical or ':' as both of the above could be considered accessing data from within two arrays. Add the multiplication (or whatever) operator that is needed, verify that no other lines of code exhibit similar behaviour, and try again!
2 件のコメント
Geoff Hayes
2014 年 7 月 29 日
Vu - unfortunately, I don't have the Symbolic Math Toolbox so cannot comment on the above. Please post as a separate question or check other posts (i.e. no explicit solution for solve).
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!