Main Content

Simulink Decision Distribution

Metric ID

slcomp.SimulinkDecisionDistribution

Description

Use this metric to determine the distribution of the number of Simulink® decisions in a unit or component. For information on how the metric calculates the number of Simulink decisions, see Simulink Decision Count.

Collection

To collect data for this metric, use getMetrics with the metric identifier slcomp.SimulinkDecisionDistribution.

Results

For this metric, instances of metric.Result return Value as a distribution structure that contains these fields:

  • BinCounts — The number of artifacts in each bin, returned as a vector.

  • BinEdges — Bin edges for the number of Simulink decisions, returned as a vector. BinEdges(1) is the left edge of the first bin and BinEdges(end) is the right edge of the last bin. The length of BinEdges is one more than the length of BinCounts.

The bins in this metric result correspond to the bins in the Simulink row and Distribution column in the Design Cyclomatic Complexity Breakdown section.

Examples

Suppose your unit has:

  • 16 model layers that each make between zero and nine Simulink decisions

  • 41 model layers that each make between 10 and 19 Simulink decisions

  • 100 model layers that each make between 20 and 29 Simulink decisions

The Value structure contains:

ans = 

  struct with fields:

    BinCounts: [16 41 100 0 0 0 0 0 0 0]
     BinEdges: [0 10 20 30 40 50 60 70 80 90 18446744073709551615]

There are 10 bins in the Simulink decision distribution. BinCounts shows the number of model layers in each bin and BinEdges shows the edges of each bin. The last bin edge is 18446744073709551615, which is the upper limit of the decision count.

For this example, there are 16 model layers in the first bin, 41 model layers in the second bin, and 100 model layers in the third bin, and no model layers in the other seven bins.

You can view the distribution bins in the Model Maintainability Dashboard. Point to a distribution bin to see tooltip information on the number of model layers and decisions associated with the bin.

See Also

Related Topics