Main Content

Simulink.io.FileType.isSimulinkParameter

Class: Simulink.io.FileType
Namespace: Simulink.io

Check if input is Simulink parameter

Since R2021b

Syntax

isParameter = Simulink.io.FileType.isSimulinkParameter(aParam)

Description

isParameter = Simulink.io.FileType.isSimulinkParameter(aParam) checks if the aParam argument is a supported Simulink.Parameter type:

  • Simulink.Simulation.ModelParameter

  • Simulink.Simulation.BlockParameter

  • Simulink.Simulation.Variable

  • Simulink.op.ModelOperatingPoint

Input Arguments

expand all

Simulink parameter, specified as a vector or scalar of one of these types:

  • Simulink.Simulation.ModelParameter (can be scalar or vector)

  • Simulink.Simulation.BlockParameter (can be scalar or vector)

  • Simulink.Simulation.Variable (can be scalar or vector)

  • Simulink.op.ModelOperatingPoint (must be scalar)

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | char | string | struct | table | cell | function_handle | categorical | datetime | duration | calendarDuration | fi
Complex Number Support: Yes

Output Arguments

expand all

Simulink parameter indicator, returned as true (1) or false (0).

Examples

expand all

Check if the parameter aParam is a Simulink parameter.

Create parameter aParam.

aParam = Simulink.Simulation.BlockParameter('f/g','Gain','5')
aParam = 

  BlockParameter with properties:

    BlockPath: 'f/g'
         Name: 'Gain'
        Value: '5'

Check if the parameter aParam is a Simulink parameter.

Simulink.io.FileType.isSimulinkParameter(aParam)
ans =

  logical

   1

Version History

Introduced in R2021b