Erase row from a cell-array

9 次查看(过去 30 天)
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 个评论
Image Analyst
Image Analyst 2014-7-27
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.

请先登录,再进行评论。

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2014-7-27

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by