Assume your file is called test.txt
>> [Dat,Num]=textread('test.txt','%s %f','headerlines',1)
Dat =
'1950-01-01'
'1950-01-02'
'1950-01-03'
'1950-01-04'
Num =
38.744999999999997
40.243000000000002
40.343000000000004
40.643000000000001
>> [Year,Month,Day]=datevec(Dat)
Year =
1950
1950
1950
1950
Month =
1
1
1
1
Day =
1
2
3
4