Converting Dates in the Cell Array into Serial Numbers
Mostrar comentarios más antiguos
Hi, I am trying to convert the dates that are currently in a cell array into serial numbers so that they could be used in a plot. The source is a .csv file. datenum() doesn't work with cell arrays and cellfun(@datenum,serialDates) gives me an array with all identical serial numbers. I don't know what else I could do. I included below a sample of data and a part of the script. I would strongly appreciate any help. Please note: "Date Time" is a single column in a .csv file.
Date Time Vibration Temperature Current
7/25/2011-8:40:34 0.1314 114.3 49.5359
Script:
userCell = textscan(fid,'%s%s%s%s','Delimiter',',');
[dates,vibration,temperature,current]=userCell{1,1:4};
dates=dates(2:end,1);
Thank you!
Respuesta aceptada
Más respuestas (1)
Artem
el 1 de Ag. de 2011
0 votos
Categorías
Más información sobre Dates and Time en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!