Hauptinhalt

Die Übersetzung dieser Seite ist veraltet. Klicken Sie hier, um die neueste Version auf Englisch zu sehen.

Einzelne Simulationen ausführen

Starten und steuern Sie einzelne Simulationen direkt aus dem Simulink® Editor oder programmatisch über die MATLAB® Eingabeaufforderung

Durch die Simulation eines Modells erhalten Sie die Ergebnisse der Algorithmen, die Sie durch den Modellierungsprozess erstellen. Sie können mit den Simulationen interagieren, indem Sie das Tempo der Simulation anpassen, die Modellparameter einstellen, die Simulation anhalten oder pausieren und die Portwerte anzeigen, um die Modellierung Ihres Modells zu bewerten. Simulationen helfen Ihnen, die Entwicklung und das Verhalten Ihres Modells zu verstehen.

Simulieren Sie ein Modell interaktiv, indem Sie auf die Schaltfläche Run in der Simulink-Symbolleiste klicken, oder programmatisch mithilfe von Funktionen wie sim und set_param im MATLAB-Befehlsfenster oder einem MATLAB-Skript.

Informationen zur Durchführung von parallelen und Batch-Simulationen finden Sie unter Mehrere Simulationen ausführen.

Modelleinstellungen

alle erweitern

InputOption to load external input data for simulation using top-level input ports
Initial stateOption to specify initial model state or operating point for simulation
Final statesOption to log final state values
Save finaloperating pointOption to save complete model operating point when simulation is paused or stopped
Operating point object from a differentreleaseDiagnostic action to take if initial operating point was generated in different release
Operatingpoint interface checksum mismatchDiagnostic action to take if model interface checksum does not match interface checksum of initial operating point
Operatingpoint contents checksum mismatchDiagnostic action to take if model contents checksum does not match contents checksum of initial operating point (Seit R2025a)
Initial state is arrayDiagnostic action to take when initial state for model is specified as array

Tools

SimulationPacing OptionsSlow simulation to a specified ratio of simulation time to wall clock time

Funktionen

alle erweitern

simRun and script programmatic simulations of Simulink models
set_paramEinstellen des Simulink-Parameterwerts
get_paramGet parameter names and values
slsim.allowedModelChangesDetermine changes you can make to model based on simulation status (Seit R2022b)
initializeInitialize simulation represented by Simulation object (Seit R2024a)
pausePause active simulation represented by Simulation object (Seit R2024a)
resumeContinue paused simulation represented by Simulation object (Seit R2024a)
setBlockParameterSet block parameter values for simulation using SimulationInput or Simulation object
setModelParameterSet model parameter values for simulation using SimulationInput or Simulation object
setExternalInputSpecify external input data for top-level input ports using SimulationInput or Simulation object
setInitialStateSpecify initial state for simulation using SimulationInput or Simulation object
setPostSimFcn Set MATLAB function to run after each simulation
setPreSimFcnSpecify MATLAB function to run before start of each simulation on Simulink.SimulationInput object
setVariableSet variable values for simulation using SimulationInput or Simulation object
setVariantConfigurationSet variant configuration for simulation using SimulationInput object (Seit R2024a)
getVariantConfigurationGet name of variant configuration from SimulationInput object (Seit R2024a)
startStart simulation represented by Simulation object (Seit R2024a)
stepAdvance simulation represented by Simulation object by specified amount (Seit R2024a)
stopStop simulation represented by Simulation object (Seit R2024a)
terminateTerminate simulation represented by Simulation object (Seit R2024a)
Simulink.BlockDiagram.getInitialStateGet initial state data from block diagram
get Get operating point information for Stateflow chart, MATLAB System block, or S-function
setSet operating point information for Stateflow chart, MATLAB System block, or S-function
findQuery and access properties on Simulink.SimulationOutput object
getAccess simulation results in Simulink.SimulationOutput object
removePropertyRemove property from Simulink.SimulationOutput object
setUserDataAdd data to metadata in Simulink.SimulationOutput object
setUserStringAdd string to metadata in Simulink.SimulationOutput object
whoGet names of editable properties on Simulink.SimulationOutput object

Objekte

alle erweitern

SimulationControl simulation execution and tune variable, block parameter, and model parameter values (Seit R2024a)
Simulink.SimulationInputErstellen von Simulink.SimulationInput-Objekten, um Änderungen am Modell für mehrere oder einzelne Simulationen vorzunehmen
Simulink.op.ModelOperatingPointComplete information that represents model operating point in simulation
Simulink.SimulationOutputAccess simulation outputs and metadata
Simulink.SimulationMetadataInformation about model, environment, execution, and timing of simulation

Themen

Grundlegende Simulationen ausführen

Simulationen analysieren

Durchführen iterativer Simulationen mit Fast Restart