MATLAB Effective Lines of Code (eLOC) Distribution
Metric ID
slcomp.MATLABeLOCDistribution
Description
Use this metric to determine the distribution of the number of effective lines of MATLAB® code. Effective lines of MATLAB code are lines of executable code.
Supported Artifacts
You can collect this metric for:
To control what the dashboard classifies as a unit or component, see Categorize Models in Hierarchy as Components or Units.
Computation Details
For information on how the metric calculates the number of effective lines of MATLAB code, see MATLAB Effective Lines of Code (eLOC).
Collection
To collect data for this metric:
In the Model Maintainability Dashboard, in the MATLAB Architecture section, click the Run metrics for widget icon. The distribution of effective lines of code appears in the Lines of Code row and Distribution column.
Use
getMetrics
with the metric identifierslcomp.MATLABeLOCDistribution
.
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 effective lines of MATLAB code, returned as a vector.BinEdges(1)
is the left edge of the first bin andBinEdges(end)
is the right edge of the last bin. The length ofBinEdges
is one more than the length ofBinCounts
.
The bins in this metric result correspond to the bins in the Lines of Code row and Distribution column in the MATLAB Architecture section.