0

I have a cell which contains cells, I want to delete specific cell from the cell array but with 'delete' function I am getting error as "Argument must contain a string". For example I have a cell A= { ['a'] ['b'] ['c'] [1 2 3]} now i want to delete the 3rd value of A that is A(3)='c' such that the new cell A after deleting A(3) will be as A={ ['a'] ['b'] [1 2 3]}, means there should not be any null value at the place of deleted value as A={['a'] ['b'] [] [1 2 3]} . Please solve my problem.

Nitendra
  • 13
  • 3
  • Hi Nitendra. Please use the search features of this site before asking -I think that your question has been answered before in numerous forms. For details on cell arrays see [this question](http://stackoverflow.com/questions/9055015/difference-between-accessing-cell-elements-using-and-curly-or-normal-brac/9055336#9055336). – horchler Aug 12 '13 at 20:51

1 Answers1

4

Use parenthesis instead of braces:

A(1) = [];
Mohsen Nosratinia
  • 9,844
  • 1
  • 27
  • 52