Where can I find syntax related with 'Simulink.Parameter', 'Simulink.Signal' and 'Simulink.CoderInfo'

1 vue (au cours des 30 derniers jours)
hello.
I'd like to leran synteax related with 'Simulink.Parameter', 'Simulink.Signal' and 'Simulink.CoderInfo'
Below command defines attribute of paramter 'p1'.
Where can I learn these syntax(command?) more ?
p1 = Simulink.Parameter;
p1.Value = 1;
p1.DataType = 'uint8'
p1.CoderInfo.StorageClass = 'Custom';
p1.CoderInfo.CustomStorageClass = 'Struct';
p1.CoderInfo.CustomAttributes.StructName = 'ConstantInputData';

Réponse acceptée

Peter O
Peter O le 11 Mar 2020
Check the documentation page:
Simulink Parameters function a little differently than standard MATLAB variables. Often, you'll get the impression that a Simulink-based data structure is really, really unnecessarily complex. This is partly to enable control/tuning/modification as Simulink runs. Parameters, for instance, are defined as tunable and non-tunable, which dictate how they can be changed in real-time or in different levels of a compiled simulation (either by the user, a function, MATLAB, or a Design Toolbox). The complex structure also allows for better specifications for Simulink Coder and the code autogenerators, bounds checking, and similar things you need to worry about if you're trusting a simulation to produce code that goes in stuff that people drive.
Simulink Blocks (type: blk = gcb and examine the structure), have a similar level of complexity and granular control. They also preserve a lot of the hierarchical information about a Simulink model. You can access/tweak the fields within Simulink Blocks through the set_param and get_param functions.
Hope this helps your understanding!
  1 commentaire
DongWook Shin
DongWook Shin le 11 Mar 2020
Thank you so much.
I found what I want to know.
Now, I can handle each property of data object including Parameter, Singal, and Lookupdtable.
I'm going to configure fields of a block by applying set_param and get_param functions.
Thanks. :D

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Event Functions dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by