[Simulink] How to set array in mask and assign first index value to a block

3 ビュー (過去 30 日間)
Hello,
I would like to set an array in the mask parameter and access the values by index. For example in mask the parameter value is ConstantValue = [1 2 3]
Inside the masked block, I assign the first index to a constant block Value = ConstantValue[0] => 1
Please suggest how I can do so?
Thank you

採用された回答

Sean de Wolski
Sean de Wolski 2017 年 7 月 7 日
Just index into the mask parameter:
  2 件のコメント
Mohammed Shameem Hussain
Mohammed Shameem Hussain 2017 年 7 月 7 日
Hi I did try that as shown in the picture Mask :
The parameter of the constant:
Error message :
What should change ?
Mohammed Shameem Hussain
Mohammed Shameem Hussain 2017 年 7 月 7 日
Hi,
I got my mistake In matlab index starts from 1 , I got confused as I am programing for hardware.
Thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAuthor Block Masks についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by