フィルターのクリア

use a .m file to set up constants for a simulink model

13 ビュー (過去 30 日間)
Jonathan Kunkle
Jonathan Kunkle 2016 年 4 月 25 日
回答済み: Subhra Saha 2016 年 4 月 28 日
I would like to create a .m file that sets up constants for component values in a simulink model. The simulink model will have variable values that link to the .m file to get the value. For example a resistor value in the simulink model would be 'R1'. The .m file would have a line R1=10*10^3; The simulink model would then set all resistors that have 'R1' as the value to 10*10^3.

回答 (1 件)

Subhra Saha
Subhra Saha 2016 年 4 月 28 日
You can set up the constants in a .m file, but make sure to run the .m file so that the variables are loaded into the MATLAB workspace and then Simulink would be able to use the variables in MATLAB workspace.
Hope this helps!

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by