take jst the hour and munites from a vector
    3 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
hi all!
i have a cellcontains time: hour:munites:second
 %%T=    
    '15:09:16'
    '15:09:17'
    '15:09:17'
    '15:09:18'
    '15:09:18'
    '15:09:18'
    '15:09:19'
    '15:09:19'
    '15:09:19'
    '15:09:20'
    '15:09:20'
    '15:09:20'
i want just the hours and minutes like this:
T= '15:09' '15:09' '15:09' '15:09' '15:09' '15:09' '15:09' '15:09' '15:09' '15:09' '15:09' '15:09'
Couls someone help?
Thank you all
0 comentarios
Respuestas (1)
  Guillaume
      
      
 el 7 de En. de 2015
        There are many, many ways to do this, using cellfun, regexp, conversion to datevec or datetime, etc.
One way:
T = regexp(T, '\d+:\d+', 'match', 'once');
0 comentarios
Ver también
Categorías
				Más información sobre Data Type Conversion en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!