global variable in a S-function
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi everyone
I'm simulating an partial differential equation (PDE) using the S-function block. When i use numbers in the mask parameters the model work well, but I want to use a global variable from other file to put in the mask parameters and occurs an error. I saw that I can only put numbers in the mask parameters, but I have a time variant parameter. How I can put an value from workspace or a variable with a number in the mask parameter from s-function?
best regards,
Gustavo
0 comentarios
Respuestas (2)
Kaustubha Govind
el 25 de Abr. de 2012
From your description, this seems like the supported workflow. Please specify the error message that you see? Also, please ensure that if you want to tune that parameter (ie, it is time-variant), please ensure that your S-function declares the parameter as tunable using ssSetSFcnParamTunable.
One other thing is that you need to run Ctrl+D or set_param(model, 'SimulationCommand', 'update') every time tunable parameters change in the workspace in order for Simulink to pick up the new value.
0 comentarios
Ver también
Categorías
Más información sobre Block and Blockset Authoring 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!