In Simulink, how do I use the user-defined matlab function in a feedback loop, as a transfer function?

3 views (last 30 days)
Hi, I'm trying to model PD control of two-link manipulator with lagrangian dyanmics. Here is the block diagram of my model
I used Matlab function block to model the system, rather than using the transfer function block.
However, I'm getting messages that Simulink cannot determine sizes and types of the outputs for Dinv block.
I think it might be related to the fact that I'm using the some of the input for the Dinv are from output of Dinv.
I would like to know what I should do to create a feedback loop that utilize user-defined Matlab function, like the one I've shown above.
Thank you
Sangwon Park

Answers (0)

Categories

Find more on Simulink Functions 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!