Descriptive Statistics Function for a Dataset Array
Mostrar comentarios más antiguos
Dear all,
Is there a single function that returns the basic descriptive statistics from a dataset array?
Something like the summary function but more complete
Thanks in advance,
Diego
Respuesta aceptada
Más respuestas (1)
Teja Muppirala
el 4 de Dic. de 2012
Perhaps you could write a simple routine using the DATASETFUN function to calculate all the stats you wanted?
For example:
% Just a sample dataset
DS = cell2dataset([{'Bill' 'Jane' 'Mark' 'Mary'}; num2cell(rand(6,4))])
% Calculate the stats you want
stats = datasetfun(@(x) [mean(x); min(x); max(x); std(x)],DS,'Uniform',0);
% Now display the result in a a new dataset
myStats = dataset(stats{:},'VarNames',get(DS,'VarNames'),'ObsNames',{'Mean' 'Min' 'Max' 'St Dev.'});
disp(myStats);
1 comentario
Diego
el 4 de Dic. de 2012
Categorías
Más información sobre Managing Data en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!