I want to call function handle model_jacobian
, but i get "Error using ==> horzcat
CAT arguments dimensions are not consistent.". When i pick function that leaves both a
and d
coefs in jacobian, everything works fine.
syms a d x;
syms_function = a*x+d;
model_jacobian = matlabFunction(jacobian(syms_function, [a d]), 'vars', {[a d], x});
J = model_jacobian([1 1], [1 2 3 4 5 6 7 8 9]');
So how to call function handle with arguments despite the fact that they are not used there?