MATLAB: Remove columns for a cell array

cell arrays

Z= {10x3000}
how do i trim away 1000 columns to
Z={10x2000}

Best Answer

One way
>> cac = cell(10,3000);
>> cac = cac(:,1:end-1000);
>> size(cac)
ans =
10 2000
>>
and another
cac = cell(10,3000);
cac(:,2001:end) = [];
whos cac
Name Size Bytes Class Attributes
cac 10x2000 160000 cell