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!