![]() The AlgorithmParameters of an Add block is Inputs = '++' I think these parameters are parameters that can affect the underlying implementation of the algorithm. There’s no detailed information on AlgorithmParameters and SecondaryAlgorithmParameters. TreatAsGroupedWhenPropagatingVariantConditions = 'on' RTWMemSecDataParameters = 'Inherit from model' RTWMemSecDataInternal = 'Inherit from model' RTWMemSecDataConstants = 'Inherit from model' RTWMemSecFuncExecute = 'Inherit from model' RTWMemSecFuncInitTerm = 'Inherit from model' The IntrinsicDialogParameters is ShowPortLabels = 'FromPortIcon' e.g., for a masked subsystem I’ve written, the DialogParameters is WrapTypeStr = '[-pi, pi) or [-1, 1)' Use instead of DialogParameters if you want block-specific parameters for masked or unmasked blocks. The IntrinsicDialogParameters is list of names/attributes of block-specific parameters (regardless of whether the block is masked or unmasked). In addition to DialogParameters, the parameters of the block diagram also include IntrinsicDialogParameters, AlgorithmParameters, and SecondaryAlgorithmParameters. SampleTime = '-1' IntrinsicDialogParameters and AlgorithmParameters OutDataTypeStr = 'Inherit: Inherit via internal rule' ParamDataTypeStr = 'Inherit: Inherit via internal rule' The value of these fields can be obtained by for param = fieldnames(get_param(gcb,'DialogParameters'))'įprintf('%s = %s\n',param))) Take the Gain block for example, the return value of get_param(gcb,'DialogParameters') is a struct Gain: Returns the value of the specified model or block parameter. Specify any model or block parameter, or block dialog box parameter. If the block has a mask, the function instead returns the mask parameters. Returns a structure array with the block dialog box parameter names as separate fields in the structure. Returns a structure array with the parameter names of the specified object (model, block, or root) as separate fields in the structure. % get_param DialogParameters by block pathįrom the Simulink’s help page Specified Parameter The usage and return value of get and get_param are basically the same, the difference is that get can get all parameter values through the handle. You can use the following codes to achieve the conversion between handle and path. Note, you can use gcb to obtain the path of currently selected block, and bdroot to obtain the path of the base diagram.Īssuming obj_h is the block’s handle, blk_path is the block’s path. The get function receives the handle input value, and get_param receives the handle or block path input value. Simulink provides get and get_param functions to get the parameter values of the block diagram. ![]() 3 IntrinsicDialogParameters and AlgorithmParameters get() and get_param() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |