average and standard deviation of one column of a matrix
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
altaf ahmed
el 5 de Mayo de 2019
Comentada: per isakson
el 7 de Mayo de 2019
I want to calcualte the average and standard deviation for one column of a 1000x10 matrix.
Is there a quicker/efficient way or should I use existing code :
theSum = 0;
for k = 1 : length(x)
theSum = theSum + x(k);
end
theMean = theSum / length(x);
0 comentarios
Respuesta aceptada
per isakson
el 5 de Mayo de 2019
Editada: per isakson
el 5 de Mayo de 2019
2 comentarios
per isakson
el 7 de Mayo de 2019
"result is obtained based on all columns rather than just one? " Yes
X = rand(5);
mean(X(:)), std(X(:))
"2a- number of occurences for ..." The values of the "matrix of 1000x10" are they whole numbers?
Más respuestas (0)
Ver también
Categorías
Más información sobre Descriptive Statistics en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!