This function mimics Stata's summarize command.
Updated 5 Aug 2014

View License

This function finds summary statistics of X, which can be a column vector or matrix.
Additionally, allows for computation of weighted statistics (if user supplies weighting vector or matrix) and detailed summary statistics. Weights are "fweights" in the Stata sense and detailed summary statistics are displayed in a similar fashion as Stata's "detail" option.

Cite As

Tyler Ransom (2024). summarize (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on MATLAB Report Generator in Help Center and MATLAB Answers

Inspired by: Descriptive Statistics

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Fixes a bug when logical inputs are provided.

Fixed ordering of columns in output matrix so that max after after min.

Fixed error that occurs when largest/smallest 5 values are computed for a vector that has less than 5 values (now, the min and max are displayed for all of these values)

Fixes bug when a variable has all missing values. Also fixes a bug that had been preventing the use of logical variables.