Data store memory can not set initial value using set_param

I make Model.slx and open this file.
And put a Data Store Memory.
MATLAB Command window
listMask = find_system('Model','LookUnderMasks','all','BlockType','DataStoreMemory');
get_param( listMask, 'Initialvalue' ) Ans= '0'
get param is OK(I can read initial value on DataStoreMemory). But
set_param(listMask(1),'InitialValue','test')
=>Invalid Simulink object specifier
I can not set initial value ('test') using set_param
Please tell me how to set the initial value using set_param.

 採用された回答

ES
ES 2017 年 3 月 24 日

0 投票

use this
set_param(listMask{1},'InitialValue','test')
listMask(1) and listMask{1} are different.

1 件のコメント

ka hi
ka hi 2017 年 3 月 27 日
Thank you!
I can set initial value to DataStoreMemory

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProgrammatic Model Editing についてさらに検索

質問済み:

2017 年 3 月 24 日

コメント済み:

2017 年 3 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by