Error using sym/subsindex (line 1555) Indexing input must be numeric, logical or ':'.

1 view (last 30 days)
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

Answers (1)

Geoff Hayes
Geoff Hayes on 29 Jul 2014
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 Comments
Vu
Vu on 29 Jul 2014
Thanks so much. Its been fixed. But then it said the explicit solution cant be found? Is it any way that we can solve this system? Here are some parameters:
N=5/0.602;
muD=log(2)/(45*60);
%muR=3.35*10^-4;
kPqloop=7.23*10^-3;
kPqunloop=8.871*10^-2;
kXarloop=1.021*10^-2;
kXarunloop=1.21*10^-3;
kxloop=8.23*10^-3;
kxunloop=1.21*10^-3;
kQarloop=1.8*10^-3;
kQarunloop=1.08*10^-2;
kconj=2*10^-4;
ki=10^-2;
p=10^-11;
kTi=10^-4;
kTc=10^-3;
%kc=1.2*10^-1;
kar=10^-3;
Kq=4.43;
Kb=10^6;
kdown=10^-3;
lamQs=10^-4;
lamQl=0.1;
lamXar=3.851*10^-4;
lamQar=10^-3;
lamX=10^-4;
lameI=10^-6;
lameC=10^-6;
lamiI=10^-6;
lamiC=10^-6;
lamPrgB=10^-3;
DDensity=5*10^7;
Thanks, Vu
Geoff Hayes
Geoff Hayes on 29 Jul 2014
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).

Sign in to comment.

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!