Put excel collumns in an array

조회 수: 1 (최근 30일)
Lucas S
Lucas S 2020년 4월 28일
댓글: Lucas S 2020년 4월 28일
Hello !
I have never used excel parser in Matlab. I have an excel file which have 3 columns. And i would like to save all elements of column 2 in an array and all elements of column 3 in an other array. How can i browse the excel file column by column and then line by line ?
Thank you !

채택된 답변

Saurav Roy
Saurav Roy 2020년 4월 28일
Hey !
I hope this is what you are looking for....
% Read Excel Sheet
[~,~,data] = xlsread('Add path to the excel file (.xlsx)');
% Save columns
arraycolumn2 = data(:,2); % Parse column 2
arraycolumn3 = data(:,3); % Parse column 3

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by