MATLAB: How can i create a descriptive statistics table for columns

descreptivemeanstatistics

Hey Guys!
My MatLab skills are pretty pretty basic and now i need your help with something, because i can't find the answer here. So i have a 15×10 data.mat where there are 10 variables with 15 values. Now i want some descreptive statistics of those variables.
The perfect solution would be a group that looks kind of like this:
Mean Max Std ...
Variable 1 x x x
Variable 2 x x x
...
Is there any way to achieve a table/group like this?
Thank you very much in advance!

Best Answer

The default behavior for most of the statistical function is for column-wise operation and since that is what you want you can just apply them to your data matrix. So, if you want to collate the results together in a matrix:
results=[mean(data)' max(data)' std(data)']
If you specically want a table then:
dummyData=randi(10,15,10)
results=table()
results.Mean=mean(dummyData)'
results.Max=max(dummyData)'
results.Std_dev=std(dummyData)'
results =
10×3 table
Mean Max Std_dev
______ ___ _______
5.6 10 3.4184
5.0667 9 2.7894
4.6667 10 3.2878
6.0667 10 2.7894
5.2 10 2.8082
5.0667 10 2.5765
5 10 2.9032
5.6 10 2.7464
5.5333 10 2.8502
5.2 9 2.5967