Skip to Main Content Skip to Search
Product Documentation

Importing MATLAB timeseries Data

A root-level Inport, Enable, Trigger, and From Workspace block can import data specified by a MATLAB timeseries object residing in a workspace.

Specifying the Time Dimension

When you create a MATLAB timeseries object to import data to Simulink, the time dimension depends on the dimension and type of signal data:

Models with Multiple Root Inport Blocks

If you use a MATLAB timeseries object for a root Inport block in a model that has multiple root Inport blocks, convert all of the other root Inport block data that uses Simulink.TsArray or Simulink.Timeseries objects to MATLAB timeseries objects or a structure of MATLABtimeseries objects.

You can use the Simulink.Timeseries.convertToMATLABTimeseries method to convert a Simulink.Timeseries object to a MATLAB timeseries object. For example, if sim_ts is a Simulink.Timeseries object, then the following line converts sim_ts to a MATLAB timeseries object:

ts = sim_ts.convertToMATLABTimeseries;
  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS