reference
API Reference › Response Review And Stats
response_review_stats.analysisRun.summarizeMetrics
Compute grouped metric counts and finite means.
Syntax
summary = response_review_stats.analysisRun.summarizeMetrics(metrics)Description
Produces compact descriptive statistics from response metric rows. Groups follow their first occurrence. The function performs no weighting, confidence interval, hypothesis test, or outlier removal.
Inputs
metrics- Metric table. pairId selects groups when that variable exists; otherwise SegmentName is used, and otherwise all rows belong to "all". Amplitude may be named PeakToPeak or peakToPeak. SNR may be named SNR_dB or snrDb.
Outputs
summary- Table with one row per group.
Summary Columns
Group - Group name in stable first-occurrence order. Count - Number of input rows in the group, including rows whose metrics are nonfinite. MeanPeakToPeak - Arithmetic mean of finite group amplitudes, or NaN when the amplitude variable is absent or has no finite values. MeanSnrDb - Arithmetic mean of finite group SNR values in decibels, or NaN when the SNR variable is absent or has no finite values.
Failure Behavior
Empty or non-table input returns one "all" row with Count=0 and NaN means.
Example
metrics = table(["cp"; "cp"; "ta"], [3; 5; 2], [20; 22; 10], ...
'VariableNames', {'pairId', 'peakToPeak', 'snrDb'});
summary = response_review_stats.analysisRun.summarizeMetrics(metrics);
assert(summary.Group(1) == "cp" && summary.MeanPeakToPeak(1) == 4)Related APIs
response_review_stats.analysisRun.measureAlignedSegments— Measure peak-to-peak, noise, and SNR per segment.response_review_stats.analysisRun.alignSegments— Interpolate segment traces to a shared time grid.
Source
This page is generated from the MATLAB help text in apps/neurophysiology/response_review_stats/+response_review_stats/+analysisRun/summarizeMetrics.m.