How to access Simulink Model callbacks like PreLoadFcn, InitFcn, StopFcn from matlab command window?

16 visualizaciones (últimos 30 días)
I need to access the commands present inside Model Callbacks like PreLoadFcn, PostLoadFcn, InitFcn, StartFcn, StopFcn from the matlab command line for some scripting purpose. Is there any way to do with some inbuilt functions or any other way?

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 29 de Jul. de 2021
Model='f14';
open_system(Model)
get_param(Model,'PreLoadFcn');
set_param(Model,'PreLoadFcn','YourFunctionName')

Más respuestas (0)

Categorías

Más información sobre Model, Block, and Port Callbacks en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by