getcompindex

Returns the index of a component for a given data type. The function has two forms. Use the first form when there is zero or at most one subcase and second form when there are multiple subcases.

Attention: Available only with Activate commercial edition.

Syntax

getcompindex(filename, datatype, component)

getcompindex(filename, subcase, datatype, component)

R = getcompindex(...)

Inputs

filename
Path of the file.
Type: string
subcase
Subcase name or index in the file.
Type: string | int
datatype
Data type name or index in the file.
Type: string | int
component
Component name to find the index of.
Type: string

Outputs

R
Index of the component.

Examples

Basic getcompindex example without subcase:

getcompindex('Path/To/File/ANGACC','Angular Acceleration','X-comp. ang. acc.')
R = 2
Basic getcompindex example with subcase:
getcompindex('Path/To/File/vdd_crc_r60_acc_crc.res','Results','Request_ptr_rear_brake_torque_data','torque')
R = 3
Basic getcompindex example using datatype:
getcompindex('Path/To/File/ANGACC', 2,'X-comp. ang. acc.')
R = 2