Interacting with a Simulink Model from a Matlab Script

Christopher Lum
Christopher Lum
184.7 هزار بار بازدید - 6 سال پیش - This video illustrates how to
This video illustrates how to control and interact with a Simulink model from a Matlab script. This is useful if you would like to analyze data generated from a Simulink model in the Matlab environment. Some topics we cover in this video include but are not limited to: 1. Defining model parameters from a Matlab script 2. Sending data generated by a Simulink model back to Matlab 3. Using data from Matlab as inputs to a Simulink model [UPDATE] This video uses Matlab R2016b. The techniques demonstrated in this video for saving data from the Simulink model have changed in newer versions of Matlab. If you run into issues extracting data, try modifying the code as shown below out = sim('PendulumModel.slx'); logsout = out.logsout; simX = out.simX; yout = out.yout; Topics and Timestamps: 0:00 – Introduction 0:55 – Building the Simulink model 10:15 – Running a model using a .m file 12:18 – Saving data using a ‘Out1’ block 22:00 – Saving data using a ‘To Workspace’ block 27:53 – Saving data by logging a signal 31:43 – Using Matlab data as input to a Simulink model Before watching, please ensure you have viewed the following video(s): -Ordinary Differential Equations and Dynamic Systems in Simulink (   • Ordinary Differential Equations and D...  ) All Matlab videos in a single playlist (   • Working with Matlab  ) #Matlab #Simulink You can support this channel via Patreon at www.patreon.com/christopherwlum. Thank you for your help!
6 سال پیش در تاریخ 1397/07/22 منتشر شده است.
184,736 بـار بازدید شده
... بیشتر