Image Processing in MATLAB
I guess you have a Binary (Logic) mask you want to multiply the image by.  

It is easy:

mMask = double(mMaskBinary);

for ii = 1:numChannels

    mOutImage(:, :, ii) = mMask  .* mInputImage(:, :, ii);

end


In the latest MATLAB releases (From R2016b) expansion is done implicitly.
Hence if you want to do a multiplication between $ M \times N $ image to $ M \times N \times 3 $ image you can just multiply them element by element and the expansion to the 3rd dimension will happen automatically like in the loop above.

Enjoy.