Data store memory can not set initial value using set_param

8 visualizaciones (últimos 30 días)
ka hi
ka hi el 24 de Mzo. de 2017
Comentada: ka hi el 27 de Mzo. de 2017
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.

Respuesta aceptada

ES
ES el 24 de Mzo. de 2017
use this
set_param(listMask{1},'InitialValue','test')
listMask(1) and listMask{1} are different.

Más respuestas (0)

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by