Main Content

Simulink.io.FileType.isInput

Class: Simulink.io.FileType
Package: Simulink.io

Check if input is acceptable Simulink input

Syntax

isSimulinkInput = Simulink.io.FileType.isInput(ts)

Description

isSimulinkInput = Simulink.io.FileType.isInput(ts) checks if the ts argument is a MATLAB® variable that can be used as Simulink® simulation input.

Input Arguments

expand all

Simulink input, specified as a MATLAB variable. This variable must be an acceptable Simulink input, such as the data formats listed at Data Format or Type.

Example: timeseries([0;9])

Data Types: char | string

Output Arguments

expand all

File input indicator, returned as 't' (true) or 'f' (false).

Examples

expand all

Check if the timeseries ts is an input supported by Simulink.

Create timeseries variable ts.

ts = timeseries([sin(0:.01:100)'])
  timeseries

  Common Properties:
            Name: 'unnamed'
            Time: [10001x1 double]
        TimeInfo: [1x1 tsdata.timemetadata]
            Data: [10001x1 double]
        DataInfo: [1x1 tsdata.datametadata]

  More properties, Methods

Check if ts is accepted by Simulink.

Simulink.io.FileType.isInput(ts)
ans =

  logical

   1
Introduced in R2021b