Extract/read data from a matrix of a specific column that starts from a specific row and reads the rest of the rows below it
조회 수: 57 (최근 30일)
이전 댓글 표시
Hello, I have a matrix of data I imported from excel via the readmatrix() function and I want to extract a variable, lets say the time, but the first 11 rows are data that are not related to the time data. So I want to do something like: time = matrix(11:, 1). Essentially, a column vector that reads from a matrix, starting at row 11 but reads the entire rest of the data in the column. Sorry, this may be a beginner question. Any help is much appreciated!
댓글 수: 0
채택된 답변
Voss
2022년 11월 14일
You've almost got it already.
To include row 11:
time = matrix(11:end,1);
To exclude row 11:
time = matrix(12:end,1);
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!