フィルターのクリア

Get invalid Simulink block parameter setting programmatically

1 回表示 (過去 30 日間)
giga
giga 2016 年 2 月 1 日
編集済み: giga 2016 年 2 月 1 日
I've created a Simulink model programmatically and when I try simulating it, I get Simulink:Parameters:InvParamSetting exception. Catching the exception, I can get the handles of the blocks which has invalid parameter setting(s).
Can I programmatically find which parameter is causing the error? If I examine message property of the exception, I can get this string:
Invalid setting in 'sampleModel1/someblock' for parameter 'VariableName'.
I can parse the string above and find that VariableName is the culprit. However, will this method work in general for all types of blocks/parameters? I am looking for a more elegant way to find the parameter for which I need to specify a valid value.
Also if possible, what type of value the parameter excepts i.e. programmatically finding out data mentioned in this page: Block-specific Parameters . The Values column specify what type of value the parameter expects. Is there any way to find this data programmatically? (I have asked this in a separate question here.)
Thanks for your help!

回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by