编者注: This file was selected as MATLAB Central Pick of the Week
R= ALLSTATS(A) returns a structure R with several statistics of vector A. A grouping factor can be given in an optional vector. In that case all the statistics will be calculated per group. The stats calculated (returned as fields of R) are:
R.min= minimum
R.max= maximum
R.mean= mean
R.std= standard deviation
R.mode= mode
R.q2p5= 2.5 percentile
R.q5= 5 percentile
R.q25= 25 percentile
R.q50= 50 percentile (median)
R.q75= 75 percentile
R.q95= 95 percentile
R.q97p5= 97.5 percentile
R.kurt= Kurtosis
R.skew= Skewness
% Example. No groups
x= rand(10,1);
R= allstats(x)
% Example. With 2 groups
g= [1;1;1;1;1;2;2;2;2;2];
R= allstats(x,g)
引用格式
Francisco de Castro (2024). Allstats (https://www.mathworks.com/matlabcentral/fileexchange/25572-allstats), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
- AI and Statistics > Statistics and Machine Learning Toolbox > Descriptive Statistics and Visualization >
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!