How to empty cell array?

7 visualizzazioni (ultimi 30 giorni)
Mohammed
Mohammed il 22 Mag 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?

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by