Get editable parameters of blocks

조회 수: 2 (최근 30일)
galaxy
galaxy 2019년 12월 10일
답변: stozaki 2020년 1월 7일
Dear all,
As we know, we can use get_param function for get value of parameter blocks which we know the parameter name.
Example:
constant.PNG
We can get value of constant value parameter (name is 'Value') via:
>> get_param('Model/Constant', 'Value')
ans =
'2'
So, how to get all of edit-able parameters of all block in model ???
If we check one-by-one block, then take a long time. So do anyone have ideas for this task.
Many thanks,

답변 (1개)

stozaki
stozaki 2020년 1월 7일
Thank you for your question about get_param function.
Please test :
allParams = get_param(gcbh, 'ObjectParameters');
This block property is documented in the get_param.
Regards,
stozaki

카테고리

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

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by