Main Content

本页对应的英文页面已更新,但尚未翻译。 若要查看最新内容,请点击此处访问英文页面。

检查和分析仿真结果

使用 Simulation Data Inspector 检查和比较仿真结果,以验证模型设计

您可以使用 Simulation Data Inspector 来检查和比较多个仿真的数据。例如,您可以检查两个信号之间的差异是否在一定的设计误差界限内。要了解详细信息,请参阅 Simulation Data Inspector

工具

全部展开

Simulation Data Inspector检查并比较数据和仿真结果,以验证和迭代模型设计

函数

全部展开

General

Simulink.sdi.view打开 Simulation Data Inspector。
Simulink.sdi.closeClose the Simulation Data Inspector
Simulink.sdi.clearAllSubPlotsClear plotted signals from all subplots in the Simulation Data Inspector
Simulink.sdi.snapshotCapture contents of Simulation Data Inspector plots
Simulink.sdi.clearPreferencesRestore Simulation Data Inspector preferences to default settings
Simulink.sdi.saveViewSave visualization settings to apply to other data
Simulink.sdi.loadViewLoad a view file to visualize data in the Simulation Data Inspector

并行工作流支持

Simulink.sdi.enablePCTSupportControl when to import data from parallel simulations into the Simulation Data Inspector
Simulink.sdi.isPCTSupportEnabledDetermine status and mode for Parallel Computing Toolbox support
Simulink.sdi.sendWorkerRunToClientSend run created on parallel workers to the Simulation Data Inspector
Simulink.sdi.cleanupWorkerResourcesClean up worker repositories

自定义时间图外观

Simulink.sdi.setSubPlotLayoutSet subplot layout in the Simulation Data Inspector
Simulink.sdi.setTableGroupingChange signal grouping hierarchy in Inspect pane
Simulink.sdi.getMarkersOnDetermine if data markers are shown in the Simulation Data Inspector
Simulink.sdi.setMarkersOnShow or hide markers for plotted signals
Simulink.sdi.getGridOnDetermine grid configuration for time plots
Simulink.sdi.setGridOnConfigure grid lines for time plots in the Simulation Data Inspector
Simulink.sdi.getTicksPositionGet tick mark position setting for time plots
Simulink.sdi.setTicksPositionConfigure position for tick marks on time plots in the Simulation Data Inspector
Simulink.sdi.getTickLabelsDisplayGet tick mark label setting for time plots
Simulink.sdi.setTickLabelsDisplayConfigure tick label visibility for time plot axes
Simulink.sdi.getBorderOnGet border display setting for time plots
Simulink.sdi.setBorderOnDisplay or hide border on time plots
Simulink.sdi.compareRunsCompare data in two simulation runs
Simulink.sdi.compareSignals比较两个信号的数据
Simulink.sdi.getCurrentComparisonAccess results from most recent comparison
Simulink.sdi.DiffRunResult.getLatestAccess results from most recent comparison
getResultByIndexReturn signal comparison result
saveResultSave comparison results to an MLDATX file

创建和访问运行

Simulink.sdi.Run.getLatestGet the most recently created Simulation Data Inspector run
Simulink.sdi.getCurrentSimulationRunAccess data for in-progress or most recently completed simulation
Simulink.sdi.createRunImport data into the Simulation Data Inspector
Simulink.sdi.getRunAccess data for a Simulation Data Inspector run
Simulink.sdi.copyRunCopy a Simulation Data Inspector run
Simulink.sdi.addToRunAdd one or more signals to existing run
Simulink.sdi.exportRunExport Simulation Data Inspector run data to the workspace or a file
Simulink.sdi.deleteRunDelete a run from the Simulation Data Inspector repository
Simulink.sdi.getRunCountGet number of runs in Simulation Data Inspector repository
Simulink.sdi.getRunIDByIndexUse Simulation Data Inspector run index to get run ID
Simulink.sdi.getAllRunIDsGet all Simulation Data Inspector run identifiers
Simulink.sdi.isValidRunIDDetermine whether a run ID is valid
Simulink.sdi.createRunOrAddToStreamedRunCreate a single run for all simulation outputs

运行对象函数

addAdd signals to Simulink.sdi.Run object
exportExport run to base workspace or file
getAllSignalIDsGet all signal IDs for signals in Simulink.sdi.Run object
getAllSignalsGet all signals in Simulink.sdi.Run object
getDatasetRefCreate DatasetRef for worker run
getSignalByIndexGet signal in Simulink.sdi.Run object by index
getSignalIDByIndexGet signal ID for signal at specified index in Simulink.sdi.Run object
getSignalIDsByNameGet signal IDs for signals inside Simulink.sdi.Run object using signal name
getSignalsByNameAccess signals in a Simulink.sdi.Run object using signal name
isValidSignalIDCheck whether signal ID corresponds to signal in Simulink.sdi.Run object

运行管理设置

Simulink.sdi.getRunNamingRuleGet the Simulation Data Inspector rule for naming runs
Simulink.sdi.setRunNamingRuleSpecify the Simulation Data Inspector run naming rule
Simulink.sdi.resetRunNamingRuleRevert the Simulation Data Inspector run naming rule to default
Simulink.sdi.copyRunViewSettingsCopy line style and color for signals from one run to another

访问信号

Simulink.sdi.getSignalGet Simulink.sdi.Signal object for a signal
Simulink.sdi.deleteSignalDelete a signal from a run in the Simulation Data Inspector
Simulink.sdi.markSignalForStreamingTurn logging on or off for a signal

信号对象函数

convertUnits Convert units of Simulink.sdi.Signal object
export Export Simulink.sdi.Signal object to workspace or file
getAsTall Create tall timetable from Simulink.sdi.Signal object
plotOnSubPlot Plot Simulink.sdi.Signal object on Simulation Data Inspector subplot
Simulink.sdi.getArchiveRunLimitDetermine configured run limit for Simulation Data Inspector archive
Simulink.sdi.setArchiveRunLimitSpecify a limit for the number of runs stored in the Simulation Data Inspector archive
Simulink.sdi.getAutoArchiveModeDetermine if the Simulation Data Inspector is configured to automatically archive
Simulink.sdi.setAutoArchiveModeSpecify whether the Simulation Data Inspector automatically archives simulation runs
Simulink.sdi.saveSave Simulation Data Inspector session
Simulink.sdi.loadLoad a Simulation Data Inspector session or view
Simulink.sdi.clear清除 Simulation Data Inspector 中的所有数据
Simulink.sdi.reportGenerate a Simulation Data Inspector report
loadIntoMemoryLoad logged data into memory

全部展开

Simulink.sdi.RunAccess run signals and metadata
Simulink.sdi.Signal 访问信号数据和元数据
Simulink.SimulationData.ParameterStores logged parameter data and metadata
Simulink.sdi.DiffRunResultAccess run comparison results
Simulink.sdi.DiffSignalResultAccess signal comparison results
Simulink.sdi.CustomSnapshot Specify settings for a snapshot without opening or affecting the Simulation Data Inspector
Simulink.sdi.WorkerRun Access simulation data from parallel workers
Simulink.SimulationData.Dataset创建 Simulink.SimulationData.Dataset 对象
Simulink.sdi.DatasetRefAccess data in Simulation Data Inspector repository
matlab.io.datastore.sdidatastore Datastore for Simulation Data Inspector signals
Simulink.HMI.InstrumentedSignalsSave and restore signal logging specification
Simulink.HMI.SignalSpecificationProgrammatically connect a Dashboard block to a signal
Simulink.sdi.constraints.MatchesSignalConstraint that compares time series data with tolerances using the Simulation Data Inspector
Simulink.sdi.constraints.MatchesSignalOptionsSpecify comparison options for Simulink.sdi.MatchesSignal constraint

主题

决定如何可视化仿真数据

为每个建模和仿真任务选择正确的可视化方法。

使用 Simulation Data Inspector 查看数据

使用 Simulation Data Inspector 查看设计过程中所有阶段的数据。

Inspect Simulation Data

View and inspect data from simulations or from imported data.

Modify Signal Properties in the Simulation Data Inspector

Modify signal properties to analyze data and create new signals.

Compare Simulation Data

Compare signals or simulation runs.

How the Simulation Data Inspector Compares Data

The Simulation Data Inspector applies specified tolerances and signal alignment techniques when comparing runs.

Create an Interactive Comparison Report

Save and share Simulation Data Inspector comparison results in an interactive web report.

保存和共享 Simulation Data Inspector 数据和视图

共享导出的数据、Simulation Data Inspector 会话和视图,并绘制图像和图窗。

Create Plots Using the Simulation Data Inspector

Create plots to analyze and present your data.

Organize Your Simulation Data Inspector Workspace

Change the arrangement of the interface and the signals you want to analyze.

Access Data in a MATLAB Function During Simulation

Stream signal data to a MATLAB® callback function during simulation for processing and visualization.

Inspect and Compare Data Programmatically

Use the Simulation Data Inspector API to plot and compare simulation data.

Keyboard Shortcuts for the Simulation Data Inspector

Use the keyboard to control the Simulation Data Inspector.

特色示例