Skip to Main Content Skip to Search
Product Documentation

Simulink.SimulationData.updateDatasetFormatLogging - Convert model and its referenced models to use Dataset format for signal logging

Syntax

Simulink.SimulationData.updateDatasetFormatLogging(top_model)
Simulink.SimulationData.updateDatasetFormatLogging(top_model, variants)

Description

Simulink.SimulationData.updateDatasetFormatLogging(top_model) converts the top-level model and all of its referenced models to use the Dataset format for signal logging instead of the ModelDataLogs format. If a Model block has the Generate preprocessor conditionals option selected, the function converts all the variants; otherwise, the function converts only the active variant.

Simulink.SimulationData.updateDatasetFormatLogging(top_model, variants) specifies which variant models to convert to use the Dataset signal logging format. For details about the variants argument, see Input Arguments

Tips

Input Arguments

top_model

String that specifies the name of the top-level model.

variants

String that specifies which variant models to update:

  • 'ActivePlusCodeVariants' — (Default) Search all variants if any generate preprocessor conditionals. Otherwise, search only the active variant.

  • 'ActiveVariants' — Convert only the active variant.

  • 'AllVariants' — Convert all variants.

Definitions

Dataset

The Dataset format causes Simulink to use a Simulink.SimulationData.Dataset object to store the logged signal data. The Dataset format use MATLAB timeseries objects to formatting the data.

ModelDataLogs

The ModelDataLogs format causes Simulink to use a Simulink.ModelDataLogs object to store the logged signal data.Simulink.Timeseries and Simulink.TsArray objects provide the format for the data.

Examples

Convert sldemo_mdlref_variants to use Dataset format for signal logging for the top-level model and all of its referenced models and variants and review results. This example updates the model, but does not save the changes because you cannot write to the sldemo_mdlref_variants demo. If you want to save the updated models, then before you use the Simulink.SimulationData.updateDatasetFormatLogging function, save the following model files to another folder. Make that folder the current MATLAB folder.

sldemo_mdlref_variants;
Simulink.SimulationData.updateDatasetFormatLogging('sldemo_mdlref_variants', 'AllVariants')

See Also

Simulink.ModelDataLogs | Simulink.ModelDataLogs.convertToDataset | Simulink.SimulationData.Dataset

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS