Filter löschen
Filter löschen

Erase row from a cell-array

2 Ansichten (letzte 30 Tage)
Maria
Maria am 27 Jul. 2014
Kommentiert: Image Analyst am 27 Jul. 2014
I have the following cell variable with 10000 rows:
A={ 'x' 'start1' 'end1'
12 1997 2000
13 1997 1999
16 1997 2002 }
And I would like to delete the first row. I tried the following code:
A(cell2mat(A(1,:)))=[];
but it returns the values all in one row, instead of the way theu were originally disposed.
Cna someone help me? Thanks
  1 Kommentar
Image Analyst
Image Analyst am 27 Jul. 2014
You might not have had to ask if you were more knowledgeable about cell arrays. Please read the FAQ http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F I think it might give you a better intuitive feel for what cells are and how to reference them. If you understood this, you might not have tried that cell2mat stuff, and would have know to do Azzi's answer.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 27 Jul. 2014

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by