How to correct "Undefined function 'mtimes' for input arguments of type 'cell'."
2 views (last 30 days)
Show older comments
Richard Westgarth
on 21 Nov 2022
Commented: Richard Westgarth
on 21 Nov 2022
I am trying to estimate parameters of some ODEs that describe the velocity vector of a wheeled mobile robot using the system identification toolbox. Specifically, I am trying to solve a non linear grey box model to find these parameters.
When I run the model I get the following error:
Error using iddata/nlgreyest
Error or mismatch in the specified ODE file "threewheeledomni_modelFile."
The error message is: "Undefined function 'mtimes' for input arguments of type 'cell'."
Here is the code for the ODE, the other file is too much to copy in here:
function[dx,y] = threewheelomni_modelFile(t,x,u,alpha1,alpha2,alpha3,beta1,beta2,beta3,gamma1,gamma2,gamma3,l,r,varargin)
alpha=[alpha1,alpha2,alpha3];
beta =[beta1,beta2,beta3];
gamma=[gamma1,gamma2,gamma3];
y=x;
rotMat = [cos(x(3)),-sin(x(3)),0;sin(x(3)),cos(theta0),0;0,0,1];
J1 = [sin(alpha(1)+beta(1)+gamma(1)),-cos(alpha(1)+beta(1)+gamma(1)),-l*cos(beta(1)+gamma(1));...
sin(alpha(2)+beta(2)+gamma(2)),-cos(alpha(2)+beta(2)+gamma(2)),-l*cos(beta(2)+gamma(2));...
sin(alpha(3)+beta(3)+gamma(3)),-cos(alpha(3)+beta(3)+gamma(3)),-l*cos(beta(3)+gamma(3))];
J2 = [r*cos(gamma1),0,0;0,r*cos(gamma2),0;0,0,r*cos(gamma3)];
dx = inv(rotMat)*inv(J1)*J2*u;
Accepted Answer
Walter Roberson
on 21 Nov 2022
The mlx constructs 11 parameters starting from alpha1 . However the modelFile expects 12 parameters starting from theta0
More Answers (0)
See Also
Categories
Find more on Transfer Function Models 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!