Code covered by the BSD License  

Highlights from
Example: Creating TimeSeries and TsArray Inputs for Simulink Bus Signal Input Data

image thumbnail

Example: Creating TimeSeries and TsArray Inputs for Simulink Bus Signal Input Data

by

 

06 Aug 2007 (Updated )

Create timeseries inputs for Simulink model root inports that are bus signals.

TimeSeriesData_Nested.m
% Copyright 2006 - 2009 The MathWorks, Inc.
ts1 = CreateTimeSeries(255*rand(101,1), 0, 0.1, 'SignalName', 'b1');
ts2 = CreateTimeSeries(uint16(255*rand(101,2)), 0, 0.1, 'SignalName', 'b2');

TsInputNested = CreateTsArray(ts1,ts2);


tsa1 = CreateTimeSeries(int8(128-255*rand(101,2)), 0, 0.1, 'SignalName', 'a1');
tsa2 = CreateTimeSeries(uint8(255*rand(101,1)), 0, 0.1, 'SignalName', 'a2');

TsInputRoot = CreateTsArray(TsInputNested,tsa1,tsa2)

Contact us