Data store memory can not set initial value using set_param

조회 수: 8 (최근 30일)
ka hi
ka hi 2017년 3월 24일
댓글: ka hi 2017년 3월 27일
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일
use this
set_param(listMask{1},'InitialValue','test')
listMask(1) and listMask{1} are different.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by