I have a 41 * 41 cell array, and I would like to make the values greater than 0.5 equal to zeros in Matlab, while keeping the rest of the values without any changes. Is it possible to work directly on the cell, or do we need to convert it to a matrix first?
My try
AAA = cell2mat( BBB );
for i = 1: length(AAA)
for j = 1 : i
if AAA(i,j) > 0.5
AAA(i,i) = 0;
else
cc = AAA(i,j);
end
end
end