Removing elements from Cell array

1 次查看(过去 30 天)
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

采纳的回答

Andrei Bobrov
Andrei Bobrov 2012-3-30
eg
A = arrayfun(@(x)randi(randi(6),randi(6),1),(1:100)','un',0);
i1 = [12, 30,45,90 ];
solution
A(i1) = [];

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by