Simulink.Parameter trouble

3 visualizaciones (últimos 30 días)
Badr Taleb
Badr Taleb el 7 de Jun. de 2018
Comentada: Badr Taleb el 8 de Jun. de 2018
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.

Respuestas (2)

Christopher Wallace
Christopher Wallace el 7 de Jun. de 2018
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 el 8 de Jun. de 2018
evalin('base', [get_param(gcb, 'Name') '=Simulink.Parameter']);
  1 comentario
Badr Taleb
Badr Taleb el 8 de Jun. de 2018
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.

Iniciar sesión para comentar.

Categorías

Más información sobre Event Functions en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by