Reputation: 157
I have a cell A
whose entries are polynomials such as
A{1} = DocPolynom([1 2 3]).
I would like to remove those entries i of A
for which length(double(A{i})) ~=2.
How can I do this?
Thanks
Upvotes: 0
Views: 190
Reputation: 16065
You should try:
inds2remove=cellfun(@(x) length(double(x))~=2,A);
A( inds2remove )=[];
Upvotes: 2