Slicing elements in a cell array
22 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Viral Solanki
el 10 de Mzo. de 2015
Editada: per isakson
el 11 de Mzo. de 2015
Hello,
I have a cell array with elements inside in the following format:
temp = {'1990-01-02T00:00:00';'1990-01-01T00:00:00';'1990-01-03T00:00:00'}
What's the easiest way to slice each element so I get
ans =
'1990-01-02'
'1990-01-01'
'1990-01-03'
0 comentarios
Respuesta aceptada
per isakson
el 11 de Mzo. de 2015
Editada: per isakson
el 11 de Mzo. de 2015
"What's the easiest way"   This approach is one candidate
>> datestr(datenum(temp,'yyyy-mm-ddTHH:MM:SS'), 'yyyy-mm-dd')
ans =
1990-01-02
1990-01-01
1990-01-03
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!