Contenido principal

fetchOutputs

R2026b

Retrieve simulation outputs from simulink.multisim.Future object

Since R2024a

Description

simOut = fetchOutputs(f) retrieves the simulation outputs from a simulink.multisim.Future object. fetchOutputs returns an N-by-1 array of Simulink.SimulationOutput objects, where N is the number of simulations in the design study. If the simulations are not yet finished, fetchOutputs waits until they complete.

Examples

collapse all

Suppose you have configured a set of simulations using a simulink.multisim.DesignStudy object stdy.

Run the design study using parsim.

f = parsim(stdy);
f.State
ans =
    'running'

Fetch all outputs. The fetchOutputs function blocks the MATLAB command prompt until simulations finish.

outputs = fetchOutputs(f)
outputs =
  19x1 Simulink.SimulationOutput array

Input Arguments

collapse all

Object representing running or completed simulations, specified as a simulink.multisim.Future object created when you call parsim with a DesignStudy object as the input argument.

Output Arguments

collapse all

Logged simulation results, represented by a Simulink.SimulationOutput array. If the simulations associated with f have failed or been canceled, the function errors.

Tips

  • fetchOutputs calls wait internally. You do not need to call wait first.

  • You can call fetchOutputs multiple times on the same simulink.multisim.Future object.

  • For large result sets, use multisimDatastore instead to process results incrementally without loading everything into memory.

Version History

Introduced in R2024a