replacing "zero dates " so as to be empty

3 vues (au cours des 30 derniers jours)
antonet
antonet le 29 Juin 2012
Dear all I have the following cell vector
'00/00/00'
'00/00/00'
'00/00/00'
'00/00/00'
'00/00/00'
'00/00/00'
'00/00/00'
'01/11/09'
'29/11/09'
'27/12/09'
I want to replace the zero dates so as to be empty, that is
' ’
' '
' '
' '
' '
' '
' '
'01/11/09'
'29/11/09'
'27/12/09'
Is there any way to do that?

Réponse acceptée

the cyclist
the cyclist le 29 Juin 2012
If C is your cell array, then
C = regexprep(C,'00/00/00','')
  1 commentaire
antonet
antonet le 29 Juin 2012
Thanks. It works perfect!

Connectez-vous pour commenter.

Plus de réponses (1)

Walter Roberson
Walter Roberson le 29 Juin 2012
emptydate = ' '; %use appropriate number of blanks
YourCell( strcmp(YourCell, '00/00/00') ) = {emptydate};
  1 commentaire
antonet
antonet le 30 Juin 2012
thank you Walter as well!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Dialog Boxes dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by