why textscan did not work ?

조회 수: 2 (최근 30일)
huda nawaf
huda nawaf 2011년 11월 3일
hi, I have file as:
1488844,3,2005-09-06
822109,5,2005-05-13
885013,4,2005-10-19
I used textscan to get each column alone then I can deal with date to convert it , but no give what I need. thanks
  댓글 수: 1
Fangjun Jiang
Fangjun Jiang 2011년 11월 3일
You've been here long enough to learn to use the {}Code format.

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

답변 (1개)

Walter Roberson
Walter Roberson 2011년 11월 3일
textscan(fid, '%f%f%s', 'Delimiter', ',')
  댓글 수: 3
huda nawaf
huda nawaf 2011년 11월 3일
sorry
it is working ,now, i did not do clear.
but please when i used
datenum(c{3})
I got
DATENUM failed.
Failed to parse date string.
Error using ==> datevec
2005 is too large to be a month.
Walter Roberson
Walter Roberson 2011년 11월 3일
datenum(c{3},'yyyy-mm-dd')

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

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by