Erase row from a cell-array

5 views (last 30 days)
Maria
Maria on 27 Jul 2014
Commented: Image Analyst on 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 Comment
Image Analyst
Image Analyst on 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.

Sign in to comment.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 27 Jul 2014
A(1,:)=[]

More Answers (0)

Community Treasure Hunt

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

Start Hunting!