How to correct "Undefined function 'mtimes' for input arguments of type 'cell'."
Show older comments
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;
2 Comments
Walter Roberson
on 21 Nov 2022
Nope, the code in the zip you attached starts
function[dx,y] = threewheelomni_modelFile(t,x,u,theta0,alpha1,alpha2,alpha3,beta1,beta2,beta3,gamma1,gamma2,gamma3,l,r,varargin)
with theta0 before the alpha1
Richard Westgarth
on 21 Nov 2022
Accepted Answer
More Answers (0)
Categories
Find more on Linear Model Identification 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!