MATLAB: How to get a list of a Simulink block’s parameters

simulink

I like to use get_param and set_param on model blocks – how do I get a list of a given block's parameters?

Best Answer

This can be accomplished using 'ObjectParameters'. Here is an example from the Simulink Documentation:
load_system('vdp')
ModelParameterNames = get_param('vdp','ObjectParameters')
This will list all of the 'vdp' model's parameters. The same can be done for a model block.