Excel dates into separate variables
이전 댓글 표시
Hello There, I have Date Information (MM/DD/YYY format) in excel that i wish to read in matlab as separate vectors. The code i'm using :
time_car = xlsread('Climatology.xls','carls','F:F');
[year_car,month_car,day_car] = datevec(num2str(time_car),'yyyymmdd');
|And the error i keep getting reads: |
Error using dtstr2dtvecmx
Failed on converting date string to date number.
Error in datevec (line 117)
y = dtstr2dtvecmx(t,icu_dtformat);
The exact same code works for the station data from Albuquerque (alb tab i attached file) without any issue. Any help would be appreciated. Thank you,
채택된 답변
추가 답변 (1개)
KSSV
2018년 1월 23일
[num,txt,raw] = xlsread('Climatology.xls') ;
dates = txt(:,6)
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!