주요 콘텐츠

cancel

R2026b

Cancel all simulations associated with simulink.multisim.Future object

Since R2024a

Syntax

Description

cancel(f) stops all simulations associated with the simulink.multisim.Future object f. After cancellation, the State property of f changes to 'failed'. If simulations have already finished or failed, cancel has no effect.

example

Examples

collapse all

Cancel a batch of running simulations.

Suppose you have configured a set of simulations using a simulink.multisim.DesignStudy object stdy. Run the simulations in parallel.

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

Cancel the running simulations.

cancel(f);
f.State
ans =
    'failed'

Calling cancel on a simulink.multisim.Future object has no effect after simulations have finished or failed.

Run simulations and wait for completion.

f = parsim(stdy);
wait(f);
f.State
ans =
    'finished'

Call cancel on the object after all the simulations have finished. The state remains 'finished'.

cancel(f);
f.State
ans =
    'finished'

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.

Version History

Introduced in R2024a