Removing elements from Cell array

Asked by shaz on 30 Mar 2012
Latest activity Answered by Andrei Bobrov on 30 Mar 2012

I have a cell of size(100*1) where i need to remove some elements from this cell where in i know the index of elements to be removed .using this index how can i remove the elements from this cell.

Eg: A = cell 0f size(100*1) where in i need to remove elements of index say 12, 30,45,90 from the cell & get a cell of size(96*1)

Thanks in advance

0 Comments

shaz

Tags

Products

No products are associated with this question.

1 Answer

Answer by Andrei Bobrov on 30 Mar 2012
Accepted answer

eg

A = arrayfun(@(x)randi(randi(6),randi(6),1),(1:100)','un',0);
i1 = [12, 30,45,90 ];

solution

A(i1) = [];

0 Comments

Andrei Bobrov

Contact us