필터 지우기
필터 지우기

How to read header (text data of 100000 rows,18 columns) from data in excel into Matlab using different directory

조회 수: 1 (최근 30일)
How to read header (text data of 100000 rows,18 columns) from data in excel into Matlab using different directory

채택된 답변

Fangjun Jiang
Fangjun Jiang 2018년 5월 9일
Not sure what do you mean by "using different directory", but did you try?
[Num, Txt, Raw]=xlsread('C:\MyDirectory\MyExcel.xls');
  댓글 수: 19
Gali Musa
Gali Musa 2018년 5월 13일
Thank you so much for the useful information, however, xlsread() is faster
Walter Roberson
Walter Roberson 2018년 5월 13일
The magic way to force xlsread() to return a number for excel dates is to use 'basic' mode. If that is too slow for you, then fix your code so that it no longer expects to date to be a column in what is returned from the num output of xlsread.
For example you could change your code to use the raw output of xlsread(), so that you have all of the row numbering that you expect. Sample code:
[~, ~, raw] = xlsread('Test1.xlsx');
raw(1,:) = []; %remove header
if ischar(raw{1,1}) %dates are string
dates = datenum(raw(:,1));
raw(1,:) = num2cell(dates);
end
num = cell2mat(raw);

댓글을 달려면 로그인하십시오.

추가 답변 (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