Main Content


Reload data signal of root inports of model on target computer



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


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.


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


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

Version History

Introduced in R2021a