Allstats

Many statistics of a vector or matrix
4.0K 次下载
更新时间 2011/7/21

查看许可证

编者注: 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 版本兼容性
创建方式 R2009a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Descriptive Statistics and Visualization 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.6.0.0

Calculation of the mode is adapted to discrete variables

1.4.0.0

avoid output...

1.3.0.0

Take into account the shape of data and groups vectors

1.2.0.0

Clarified help (hopefully). Included some error checking.

1.1.0.0

Added kurtosis and skewness

1.0.0.0