How to set global variables for simulink with matlab functions
108 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
mg
el 13 de Jun. de 2022
Comentada: Walter Roberson
el 20 de Dic. de 2022
I'd like to use global variable in matlab function block. But I cannot find "symbols pane" to set global variable as Simulink.Signal object in contents below link site. Could you tell me where it is?
- Make sure the Simulink.Signal object is registered to the MATLAB Function block.
- In the Modeling tab, in the Design section, click Symbols Pane.
- In the Symbols pane, select the data A. This data uses the same name as the global variable. Right click and select Inspect... to open the Property Inspector.
- In the Property Inspector, set the Scope of the data to Data Store Memory.
1 comentario
Walter Roberson
el 20 de Dic. de 2022
See also https://www.mathworks.com/matlabcentral/answers/1653710-global-variable-in-simulink#comment_2009495 where I show how to construct Simulink Parameters and Simulink Global from the MATLAB level.
Respuesta aceptada
Fangjun Jiang
el 14 de Jun. de 2022
The link is document for R2022a. You have R2017a.
Open your MATLAB Function block Editor, click the "Edit Data" button.
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Simulink Functions 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!