Robotics Asked by J.D. on October 20, 2020
I have built a simulink model for performing cartesian regulation on a unicycle:
and plot the results with a Matlab code
but, I am not very confident with Simulink and so I don’t know how to call these codes into my Simulink model.
Can somebody please help me?
There's a Matlab function block. Follow the example and your inputs and outputs will create source/sink connections on the Simulink block to wire in values.
I would only put the controller in there, and don't use the clear all
command - if it's not persistent
then a variable inside a function ceases to exist between function calls. Every call to the function wipes all the internal variables inside that function.
If you're wanting your data to be plotted at the end then you can use a To Workspace block and send the data out that way and plot from the console or script after the Simulink project finishes.
Answered by Chuck on October 20, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP