Main Content

reset

Reset simulink.cloud.MultisimDatastore to read from first simulation result

Since R2026a

Description

data = reset(mds) sets the read location of datastore object mds to the beginning. This reset ensures that the next call to read returns the first simulation result. Use reset when you want to start reading simulation results from the start of the datastore.

Examples

collapse all

Create a simulink.cloud.MultisimDatastore object and read the simulation results.

Suppose you have already created a simulink.multisim.DesignStudy object and have a cloud cluster. Use the batchsim function with the design study object to launch a simulation on a cloud cluster.

cloudClusterURL = "yourcluster.example.com";
cloudCluster = simulink.cloud.addCluster('myCloudCluster',cloudClusterURL);
job = batchsim(cloudCluster,designStudy);

Create a datastore using multisimDatastore to fetch and store the simulation results from the simulink.cloud.Job object.

mds = multisimDatastore(job);

You can check if the datastore has unread data using hasdata. The while loop iterates through the entire datastore and the read function reads the simulation results for each simulation.

while hasdata(mds)
  simOut = read(mds);
end

You can reset the read position of the datastore using reset and start reading again from the first set of simulation results.

reset(mds)
data = read(mds);

Input Arguments

collapse all

Datastore to reset, specified as a simulink.cloud.MultisimDatastore object.

Version History

Introduced in R2026a