I want to extract the 3rd column which contains the time data. I have managed to do it using
if truef = fopen ('trial1.csv');C = textscan(f,'%n %n %s','Delimiter',',','HeaderLines', 1)TimeStamp=C{3}(1)' DateVector = datevec(TimeStamp) fclose(f); end
In the future, I can have additional 50(for eg) new columns. I want to know is there way in matlab such that i do not define these additonal columns which can comprise of string, floating numbers etc. My textscan will become so big! Any other way of extracting the time values in column 3?
2. Secondly, why is my timeStamp value not including the seconds? It is only including until the minutes!
Please find attached the trial1.csv file
Best Answer