replacing "zero dates " so as to be empty

5 ビュー (過去 30 日間)
antonet
antonet 2012 年 6 月 29 日
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?

採用された回答

the cyclist
the cyclist 2012 年 6 月 29 日
If C is your cell array, then
C = regexprep(C,'00/00/00','')
  1 件のコメント
antonet
antonet 2012 年 6 月 29 日
Thanks. It works perfect!

サインインしてコメントする。

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 6 月 29 日
emptydate = ' '; %use appropriate number of blanks
YourCell( strcmp(YourCell, '00/00/00') ) = {emptydate};
  1 件のコメント
antonet
antonet 2012 年 6 月 30 日
thank you Walter as well!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by