How can I import excel file (.xlsx) in Matlab and store the 4th column in a vector?
조회 수: 9 (최근 30일)
이전 댓글 표시
How can I import an excel file which contains 4 columns (.xlsx) in Matlab and store the 4th column in a vector?
댓글 수: 0
답변 (2개)
Cris LaPierre
2022년 7월 1일
To just read the 4th column, use 'Range','D:D' for the Name and Value inputs.
You can use the name-value input to read in a specific column.
댓글 수: 0
Image Analyst
2022년 7월 1일
data = readmatrix(fileName); % Read entire workbook into 2-D matrix.
column4 = data(:, 4); % Extract column 4 only into column vector.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!