exportMetrics

Class: slmetric.Engine
Package: slmetric

Export model metrics

Description

Export model metric data to an XML file.

example

exportMetrics(metric_engine,filename) exports an XML filename containing metric data to your current folder.

example

exportMetrics(metric_engine,filename,filelocation) exports an XML filename containing metric data to filelocation.

Input Arguments

expand all

When you call execute, metric_engine collects metric data for available metrics or for the specified MetricIDs. Calling getMetrics accesses the collected metric data in metric_engine.

Name of XML file.

Example: 'MyMetrics.xml'

Path to XML file

Example: 'C:/mywork'

Examples

expand all

This example shows how to export metrics for model vdp to XML file MyMetrics.xml in your current folder.

% Create an slmetric.Engine object
metric_engine = slmetric.Engine();

% Specify model for metric analysis
setAnalysisRoot(metric_engine, 'Root', 'vdp', 'RootType', 'Model');

% Generate and collect model metrics
execute(metric_engine);
rc = getMetrics(metric_engine);

% Export metrics to XML file myMetrics.xml
exportMetrics(metric_engine, 'MyMetrics.xml');

This example shows how to export metrics for model vdp to XML file MyMetrics.xml in a specified folder, C:/work.

% Create an slmetric.Engine object
metric_engine = slmetric.Engine();

% Specify model for metric analysis
setAnalysisRoot(metric_engine, 'Root', 'vdp', 'RootType', 'Model');

% Collect model metrics
execute(metric_engine);
rc = getMetrics(metric_engine);

% Export metrics to XML file myMetrics.xml
exportMetrics(metric_engine, 'MyMetrics.xml', 'C:/work');

Introduced in R2016a