I have a large .csv file with the below format ('Date;Time;Value').
'16/4/2017;05:12:02;1.21'
and need to import it into 3 collumns.
'16/4/2017' '05:12:02' '1.21'
My code is:
fid = fopen('KD.csv','r');C = textscan(fid, '%s %s %f %f %s', 'HeaderLines',1, 'CollectOutput',true);fclose(fid);[dt,val,exch] = deal(C{:});w=regexp(dt,'\s+','split')out=reshape([w{:}],1,[])'time = [dt regexp(dt, '\d\d:\d\d:\d\d', 'match', 'once')]
Any help?
Best Answer