average and standard deviation of one column of a matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
altaf ahmed
am 5 Mai 2019
Kommentiert: per isakson
am 7 Mai 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 Kommentare
Akzeptierte Antwort
per isakson
am 5 Mai 2019
Bearbeitet: per isakson
am 5 Mai 2019
2 Kommentare
per isakson
am 7 Mai 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?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Time Series finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!