Error with .* for cell to Scalar multiplying

[peaks binp]= findpeaks(counts,binLocations,'MinPeakHeight',500);
level = binp(end);
A = cell(1,count);
histo = cell(2,count);
counts = 0;
for i=1:count
buffer = zeros(size(I{1},1),size(I{1},2));
index=find(I_m{i}(:,:)==level)
buffer(index)=1;
A{i}(:,:)=buffer;
OSSO{i}=I{i}.*uint16(A{i});
I wrote this code but It gives me this error: "Error using .*
Integers can only be combined with integers of the same class, or scalar doubles.
Error in bone (line 68)
OSSO{i}=I{i}.*uint16(A{i});"
Does anyone have any suggestions to solve this problem, please?
Thanks in advance

Answers (1)

OSSO{i}=uint16(I{i}).*uint16(A{i});

Categories

Asked:

on 22 Jul 2020

Commented:

on 22 Jul 2020

Community Treasure Hunt

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

Start Hunting!