Main Content

getAsTall

Create tall timetable from Simulink.sdi.Signal object

Description

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.

example

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.00056195 sec    0.092447
    0.0033717 sec      0.21085
    0.01 sec           0.48145
    0.02 sec           0.88266
    0.03 sec            1.2725
    0.04 sec            1.6512
    0.043098 sec        1.7676
          :              :
          :              :

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