Filter löschen
Filter löschen

How to empty cell array?

20 Ansichten (letzte 30 Tage)
Mohammed
Mohammed am 22 Mai 2013
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?

Akzeptierte Antwort

the cyclist
the cyclist am 22 Mai 2013
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 Kommentare
Matt J
Matt J am 22 Mai 2013
Bearbeitet: Matt J am 22 Mai 2013
Or, depending on what's needed,
c(:) = {[]};
Mohammed
Mohammed am 23 Mai 2013
Thanks a lot

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by