フィルターのクリア

Setting Simulink model inports using sim() commands

6 ビュー (過去 30 日間)
Lucas
Lucas 2012 年 5 月 17 日
I've been doing a lot of research over the last few hours and I can't seem to figure out how to get and set a value to an Inport box. I have a simple model that has one inport and one outport and they are connected to each other. I want to set the inport value to 2 and run my simulation and see if my outport got set correctly. I read that you can't use set_param() to set that value but you have to use sim(), but I'm not having any luck with that. So if anyone know how to look at the data in the inport box and/or how to set it, I'd appreciate it. Thanks!

採用された回答

Kaustubha Govind
Kaustubha Govind 2012 年 5 月 18 日
You need to use the Data Import/Export Pane of the model's Configuration Parameters window to get data using the Inport block. See Importing Data to Root-Level Input Ports for more information.

その他の回答 (0 件)

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by