How do I find the mean for 42 rows for one column, but for the second column only the first 3 rows, which is pulled from an excel table.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Collin Kerr
am 8 Mär. 2016
Beantwortet: Chad Greene
am 8 Mär. 2016
I just need to figure out how to extract only part of a column
0 Kommentare
Akzeptierte Antwort
Chad Greene
am 8 Mär. 2016
If your dataset looks like this:
X = rand(100,3);
You can get the mean of the first 42 rows of the first column of X by
mean(X(1:42,1))
and the mean of the first three rows of column 2 by:
mean(X(1:3,2))
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Tables 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!