I am using Interpreted MATLab fcn to compute forward dynamics. I am using code of accel in which I have added my robot model in the beginning, making the accel function:

function qdd = dynam(Q, qd, torque)

%my robot model here before accel code


Simulink block is like: Simulink block forward dynamics

Now when I write this in Simulink function block: dynam(u(1),u(2),u(3)) I get this error:

Caused by: Error due to multiple causes. -insufficient arguments -Error in 'model_check/Interpreted MATLAB Function' while evaluating expression.

How can I get the dynamics correct? I want qdd, qd as well as q (by integrating)

  • $\begingroup$ It might be that the way you have you setup your simulink model that the input to the Matlab function is one vector instead of three separate inputs. $\endgroup$ – fibonatic Jul 20 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.