How to empty cell array?

13 ビュー (過去 30 日間)
Mohammed
Mohammed 2013 年 5 月 22 日
Hi all
How to empty cell array?
I have a problem that every loop results overwrite the one before so I am trying to empty the cell array every loop so when it comes to successive loop the previous results not interfering the last results. Any help?

採用された回答

the cyclist
the cyclist 2013 年 5 月 22 日
It will depend on exactly what you mean by "empty", but if your cell array is named c, then this command
c(:) = []
will make c into an empty cell array, and so will
c = {}
  2 件のコメント
Matt J
Matt J 2013 年 5 月 22 日
編集済み: Matt J 2013 年 5 月 22 日
Or, depending on what's needed,
c(:) = {[]};
Mohammed
Mohammed 2013 年 5 月 23 日
Thanks a lot

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by