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 (최근 30일)
이전 댓글 표시
I just need to figure out how to extract only part of a column
댓글 수: 0
채택된 답변
Chad Greene
2016년 3월 8일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Preprocessing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!