Too many input arguments – idgrey
Hello everyone,
I’m trying to define a grey box model for parameters identification
pars = {ms; mu; meq; ceq; ks; ku; cu; km; cm};
linear_model = idgrey(‘QC_rot_func’,pars,’c’);
but I’m getting this error when running the model:
Error using idgrey (line 367)
The ODE function "QC_rot_func" could not be evaluated successfully using the given set of parameters, sample time
and optional arguments. The error message generated during the evaluation was:
Too many input arguments.
Error in main (line 175)
linear_model = idgrey(‘QC_rot_func’,pars,’c’);
The function ‘QC_rot_func’ is the following:
function [A,B,C,D] = QC_rot_func(pars,Ts)
ms = pars(1);
mu = pars(2);
meq = pars(3);
ceq = pars(4);
ks = pars(5);
ku = pars(6);
cu = pars(7);
km = pars(8);
cm = pars(9);
A = [0 0 0 1 -1 0;
0 0 0 0 1 -1;
0 0 0 0 0 1;
(-ks/ms-km/ms) -ks/ms 0 -cm/ms cm/ms 0;
(ks/mu+km/mu+km/meq) ks/mu -ku/mu (cm/mu+cm/meq) (-cm/mu-cm/meq-ceq/meq) (-cu/mu+ceq/meq);
(ks/mu+km/mu) ks/mu -ku/mu cm/mu -cm/mu -cu/mu];
Bd = [0; 0; -1; 0; cu/mu; cu/mu];
Bdlt = [0; 0; 0; 1/ms; 0; 0];
Bu = [0; 0; 0; 0; 1/meq; 0];
B = [Bd Bdlt Bu];
C = [A(4,:); A(6,:); A(1,:)+A(2,:)];
D = [B(4,:); B(6,:); B(1,:)+B(2,:)];
end
What is the problem in this code? If I try to run the function with parameters as input, I get di A B C D matrices as expected.
Thank you.Hello everyone,
I’m trying to define a grey box model for parameters identification
pars = {ms; mu; meq; ceq; ks; ku; cu; km; cm};
linear_model = idgrey(‘QC_rot_func’,pars,’c’);
but I’m getting this error when running the model:
Error using idgrey (line 367)
The ODE function "QC_rot_func" could not be evaluated successfully using the given set of parameters, sample time
and optional arguments. The error message generated during the evaluation was:
Too many input arguments.
Error in main (line 175)
linear_model = idgrey(‘QC_rot_func’,pars,’c’);
The function ‘QC_rot_func’ is the following:
function [A,B,C,D] = QC_rot_func(pars,Ts)
ms = pars(1);
mu = pars(2);
meq = pars(3);
ceq = pars(4);
ks = pars(5);
ku = pars(6);
cu = pars(7);
km = pars(8);
cm = pars(9);
A = [0 0 0 1 -1 0;
0 0 0 0 1 -1;
0 0 0 0 0 1;
(-ks/ms-km/ms) -ks/ms 0 -cm/ms cm/ms 0;
(ks/mu+km/mu+km/meq) ks/mu -ku/mu (cm/mu+cm/meq) (-cm/mu-cm/meq-ceq/meq) (-cu/mu+ceq/meq);
(ks/mu+km/mu) ks/mu -ku/mu cm/mu -cm/mu -cu/mu];
Bd = [0; 0; -1; 0; cu/mu; cu/mu];
Bdlt = [0; 0; 0; 1/ms; 0; 0];
Bu = [0; 0; 0; 0; 1/meq; 0];
B = [Bd Bdlt Bu];
C = [A(4,:); A(6,:); A(1,:)+A(2,:)];
D = [B(4,:); B(6,:); B(1,:)+B(2,:)];
end
What is the problem in this code? If I try to run the function with parameters as input, I get di A B C D matrices as expected.
Thank you. Hello everyone,
I’m trying to define a grey box model for parameters identification
pars = {ms; mu; meq; ceq; ks; ku; cu; km; cm};
linear_model = idgrey(‘QC_rot_func’,pars,’c’);
but I’m getting this error when running the model:
Error using idgrey (line 367)
The ODE function "QC_rot_func" could not be evaluated successfully using the given set of parameters, sample time
and optional arguments. The error message generated during the evaluation was:
Too many input arguments.
Error in main (line 175)
linear_model = idgrey(‘QC_rot_func’,pars,’c’);
The function ‘QC_rot_func’ is the following:
function [A,B,C,D] = QC_rot_func(pars,Ts)
ms = pars(1);
mu = pars(2);
meq = pars(3);
ceq = pars(4);
ks = pars(5);
ku = pars(6);
cu = pars(7);
km = pars(8);
cm = pars(9);
A = [0 0 0 1 -1 0;
0 0 0 0 1 -1;
0 0 0 0 0 1;
(-ks/ms-km/ms) -ks/ms 0 -cm/ms cm/ms 0;
(ks/mu+km/mu+km/meq) ks/mu -ku/mu (cm/mu+cm/meq) (-cm/mu-cm/meq-ceq/meq) (-cu/mu+ceq/meq);
(ks/mu+km/mu) ks/mu -ku/mu cm/mu -cm/mu -cu/mu];
Bd = [0; 0; -1; 0; cu/mu; cu/mu];
Bdlt = [0; 0; 0; 1/ms; 0; 0];
Bu = [0; 0; 0; 0; 1/meq; 0];
B = [Bd Bdlt Bu];
C = [A(4,:); A(6,:); A(1,:)+A(2,:)];
D = [B(4,:); B(6,:); B(1,:)+B(2,:)];
end
What is the problem in this code? If I try to run the function with parameters as input, I get di A B C D matrices as expected.
Thank you. greybox, odefunction MATLAB Answers — New Questions