For a problem of Amplitude Modulation, if I want to perform it on Simulink but get the various parameters like carrier freq. etc. from a companion m file, how do I do it ??

조회 수: 1 (최근 30일)

채택된 답변

Devineni Aslesha
Devineni Aslesha 2020년 3월 26일
There are two ways to access variables from a .m file to Simulink.
  1. Before running the Simulink model, run the .m file to save the variables in the workspace and access those variables using ‘From Workspace’ block in Simulink.
  2. In order to run your m-file automatically when you run your Simulink model, add the m-file name to the ‘InitFcn’ callback in ‘Model Properties->Callbacks’ and use those variables in the Simulink model.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by