getparamname

Block path and parameter name from parameter index

Description

example

[block_path, parameter_name] = getparamname(target_object, parameter_index) returns a vector containing the block path and the parameter name for the parameter specified by parameter_index.

Examples

collapse all

Extract the block path and parameter name for parameter 6 of 'ex_slrt_sf_car'.

tg = slrt;
[block_path, parameter_name] = getparamname(tg,6)
block_path =

  1×17 char array

Engine/Integrator


parameter_name =

  1×16 char array

InitialCondition

Input Arguments

collapse all

Object that represents the target computer. Before calling this function, make sure that you start the target computer with the Simulink® Real-Time™ kernel and apply the required Ethernet link settings.

Example: tg

The parameter index can mark either a block parameter or a global parameter that provides the value for a block parameter. To be accessible via parameter index, the block parameter or MATLAB® variable must be observable.

To access a parameter index, type tg.ShowParameters = 'on' in the Command Window, and count lines starting with 0.

Note

Parameter access by parameter index will be removed in a future release. Access parameters by parameter name instead.

Example: 0, 1

Output Arguments

collapse all

The path consists of nested blocks separated by '/'.

The parameter name as given in the block properties list.

Introduced in R2014a