Main Content

getAsTall

Create tall timetable from Simulink.sdi.Signal object

Description

example

tt = getAsTall(sig) returns a tall timetable containing the time and data values in the Simulink.sdi.Signal object sig. For more information on working with tall arrays, see Tall Arrays for Out-of-Memory Data.

Examples

collapse all

This example shows how to generate a tall timetable from the signal data in a Simulink.sdi.Signal object.

Create a run containing logged data in the Simulation Data Inspector by simulating the model sldemo_fuelsys.

sim('sldemo_fuelsys');

Use the Simulink.sdi.getAllRunIDs function to get the run ID for the run that corresponds to the simulation. Then use the Simulink.sdi.getRun function to get the Simulink.sdi.Run object that corresponds to the run ID.

runIDs = Simulink.sdi.getAllRunIDs;
runID = runIDs(end);

fuelRun = Simulink.sdi.getRun(runID);

Use the getSignalByIndex function to get the Simulink.sdi.Signal object that corresponds to the second signal in the run.

sig = getSignalByIndex(fuelRun,2);

Get a tall timetable containing the signal data by using the getAsTall function.

tt = getAsTall(sig)
tt =

  Mx1 tall timetable

         Time           Data  
    ______________    ________

    0 sec             0.068493
    0.00056199 sec    0.092452
    0.0033719 sec      0.21101
    0.01 sec           0.48273
    0.02 sec           0.88522
    0.03 sec            1.2763
    0.04 sec            1.6563
    0.05 sec            2.0255
          :              :
          :              :

Input Arguments

collapse all

Signal to return as a tall timetable, specified as a Simulink.sdi.Signal object.

Output Arguments

collapse all

Data from the Simulink.sdi.Signal, returned as a tall timetable.

Version History

Introduced in R2017b