How can i change a simulink parameter's name acording to a specific block, example: i tried to use: get_param(gcb,'name')= struct
get_param(gcb,'name')=Simulink.Parameter
but it's not working.

답변 (2개)

Christopher Wallace
Christopher Wallace 2018년 6월 7일

0 개 추천

I'm not entirely clear on your question but it looks like you should be using:
set_param(gcb, 'Name', <insert Simulink parameter>)
What parameter are you wanting to use?
TAB
TAB 2018년 6월 8일

0 개 추천

evalin('base', [get_param(gcb, 'Name') '=Simulink.Parameter']);

댓글 수: 1

Badr Taleb
Badr Taleb 2018년 6월 8일
Hi Tabrez! in my model i tried to construct a structer in order to use it as a simulink parameter, this parameter will be used for S-FUNCTION parameter that accept structer parameter (1x1) by using set param command, i tried to use your the instruction that you give me but this error appear. The code:
The error: (LINE 20 is the last line)
Thank you for your help.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Event Functions에 대해 자세히 알아보기

제품

릴리스

R2017a

질문:

2018년 6월 7일

댓글:

2018년 6월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by