Error in ==> mu at 44 if nargin < 1 | nargin > 4 Warning: usage: [bnds,rowd​,sens,rowp​,rowg] = mu(matin,blk,opt)

3 visualizaciones (últimos 30 días)
Hi,
I am writing code for some ODE's. I successfully got the plot. But when I type in
[T,V]= ode15s(@myfunc, [0.0018,100], [1.2005084e9, 1.0001628e9, 1.674764e8, 100], [],mu,DOBu,OBu,BLTGFB,...
lambdaLTGFB,KTGFBa1,KTGFBa2,lambdaTGFB,KARANK,Kres,DOBp,KTGFBr1,AOBa,DOCp,OCp,PRLd,BRANKL,...
KAOPG,R,row,lambdaRANKL,PTHtotal,KPTHtotala1,KPTHtotalr1,AOCa,KRANKLa1,Kform,POPGd,BOPG,OPGmax,lambdaOPG)
in the command window, it gives me this error:
Error in ==> mu at 44
if nargin < 1 | nargin > 4
Warning: usage: [bnds,rowd,sens,rowp,rowg] = mu(matin,blk,opt)
I wonder if someone could please help solve this problem.
Here is the code:
function main
figure(1)
OCp = 2.003456e9;
OBu = 5.118204e6;
Kform = 2.139651664708985e-11;
DOBu = 1.096776794643166e4;
DOBp = 0.252243443705397;
DOCp = 1.131894369544156;
mu = 1.00;
lambdaLTGFB = 11.4089;
BLTGFB = 0.480000192;
KTGFBa1 = 4.28e-4;
KTGFBa2 = 4.28e-4;
lambdaTGFB = 375.6523;
Kres = 1.277791975466394e-10;
KTGFBr1 = 2.49e-4;
AOBa = 3e-1;
PRLd = 0;
BRANKL = 2.153079478660874e-7;
KAOPG = 5.68e-2;
KARANK = 7.19e-2;
R = 1.28e1;
row = 1.9167e-6;
lambdaRANKL = 4.16;
KPTHtotala1 = 2.09e2;
KPTHtotalr1 = 2.21e-1;
AOCa = 1.2;
BPTH = 9.74e2;
lambdaPTH = 3.84e2;
KRANKLa1 = 4.79e1;
POPGd = 0;
BOPG = 2.0700e-6;
OPGmax = 7.98e2;
lambdaOPG = 4.16;
PTHrP = 0;
PTH = BPTH / lambdaPTH;
PTHtotal = PTH + PTHrP;
[T,V]= ode15s(@myfunc, [0.0018,100], [1.2005084e9, 1.0001628e9, 1.674764e8, 100], [],mu,DOBu,OBu,BLTGFB,...
lambdaLTGFB,KTGFBa1,KTGFBa2,lambdaTGFB,KARANK,Kres,DOBp,KTGFBr1,AOBa,DOCp,OCp,PRLd,BRANKL,...
KAOPG,R,row,lambdaRANKL,PTHtotal,KPTHtotala1,KPTHtotalr1,AOCa,KRANKLa1,Kform,POPGd,BOPG,OPGmax,lambdaOPG);
BoneT = V(:,4);
OCa = V(:,3);
OBa = V(:,2);
OBp = V(:,1);
subplot(1,2,1)
hold on
plot(T, OBp, 'c')
plot(T, OBa, 'b')
plot(T, OCa, 'r')
legend('OB_p', 'OB_a', 'OC_a');
ylabel('')
xlabel('Time t (days)')
title('Bone Cell Populations','FontSize',12)
hold off
subplot(1,2,2)
hold on
plot(T, BoneT, 'g')
ylabel('')
xlabel('Time t (days)')
title('Bone Volume','FontSize',12)
hold off
function dV = myfunc(t,V,mu,DOBu,OBu,BLTGFB,lambdaLTGFB,KTGFBa1,KTGFBa2,lambdaTGFB,KARANK,Kres,DOBp,...
KTGFBr1,AOBa,DOCp,OCp,PRLd,BRANKL,KAOPG,R,row,lambdaRANKL,PTHtotal,KPTHtotala1,KPTHtotalr1,AOCa,...
KRANKLa1,Kform,POPGd,BOPG,OPGmax,lambdaOPG)
BoneT = V(4);
OCa = V(3);
OBa = V(2);
OBp = V(1);
OPG = (BOPG .* (KPTHtotalr1 ./ (KPTHtotalr1 + PTHtotal)) .* OBa + POPGd) ./ ((BOPG ./ OPGmax) .* ...
(KPTHtotalr1 ./ (KPTHtotalr1 + PTHtotal)) .* OBa + lambdaOPG);
RANKL = (PRLd + BRANKL .* OBp) ./ ((1 + KAOPG .* OPG + KARANK .* R) .* ((BRANKL ./ (row .* (PTHtotal ./ ...
(PTHtotal + KPTHtotala1)))) + lambdaRANKL));
LTGFB = (mu .* Kres .* OCa) ./ (lambdaLTGFB + BLTGFB);
TGFB = (BLTGFB .* LTGFB) ./ (lambdaTGFB);
dOBp = DOBu .* OBu .* (TGFB ./ (TGFB + KTGFBa1)) - DOBp .* OBp * (KTGFBr1 ./ (TGFB + KTGFBr1));
dOBa = DOBp .* OBp .* (KTGFBr1 ./ (TGFB + KTGFBr1)) - AOBa .* OBa;
dOCa = DOCp .* OCp .* (RANKL ./ (RANKL + KRANKLa1)) - AOCa .* OCa .* (1+(TGFB ./ (TGFB + KTGFBa2)));
dBoneT = (Kform .* OBa) - (Kres .* OCa);
dV = [dOBp; dOBa; dOCa; dBoneT];
Thank you very much Pazzo
  3 comentarios
Pazzo
Pazzo el 4 de Ag. de 2013
Hi, dpb,
I am so sorry about my messy code format. Definitely keep in mind next time, and thank you Walter for helping me clean it up.
In fact, I also noticed that the mu might be treating as a function by Matlab. But I think I did assign mu a value, namely 1.00. And I used it as a variable. So I do not know how to fix this problem. I looked up online, and tried to change mu to something else unique, like mu_lame, but when I return the function, it said that mu_lame is undefined. Then I tried to define it as a global variable. But that did not work, either.
Any suggestions would be greatly appreciated!
Pazzo
dpb
dpb el 4 de Ag. de 2013
What does
which mu
at the command line return?
Also
whos mu*
might be informative; then again maybe not...
Use the debugger--set a
dbstop on error
and see where it is. Somehow and it's impossible to see precisely from the code posted, Matlab indeed thinks mu is a function.
I don't understand the humongeous argument list to ode15s -- the doc here (R2012b) has only
ODEFUN,TSPAN,Y0,OPTIONS
as the argument list. It would certainly make it easier to debug if you could simplify somewhat...using named variables instead of the numeric vectors and such would be a start.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by