Main Content

reloadData

Reload data signal of root inports of model on target computer

Description

example

reloadData(target_object.Stimulation, inport, u) reloads the data signal for the specified root inport of the model running on the target computer.

Examples

collapse all

To load data to an inport, create a time series object.

sampleTime = 0.1; %sample time of the model
endTime = 10; %end time of the model
numberOfSamples = endTime * 1/sampleTime + 1;
timeVector = (0:numberOfSamples) * sampleTime;
u = timeseries(timeVector*10,timeVector);

Load the object to the inport named first.

reloadData(tg.Stimulation,'first',u);

To load the same object to multiple inports named first and third.

reloadData(tg.Stimulation,'first',u,'third',u);

Input Arguments

collapse all

Provides access to methods that manipulate the target computer properties.

Example: tg

Specifies the name of the inport or inport number or block path of the inport present on the model running on the target computer.

Example: {'signal_1'}, [2], {'model_name/in4'}

Specifies a timeseries object to load into the inports.

Example: u

Introduced in R2021a