How do I correct the following error in MATLAB? MATLAB code attached.
Error using +
Integers can only be combined with integers of the same class, or scalar doubles.
Error in awgn (line 157)
y = sig + noise;
Error in Rev2 (line 20)
received_low = awgn(lenna_bits, SNR_low, 'measured');
lenna = imread('lenna.png');
lenna_gray = rgb2gray(lenna);
lenna_bits = reshape(de2bi(lenna_gray(:), 8, 'left-msb').', [], 1);
SNR_low = 10^(Eb_No_low/10);
SNR_high = 10^(Eb_No_high/10);
received_low = awgn(lenna_bits, SNR_low, 'measured');
decoded_low = received_low < 0;
decoded_image_low = reshape(decoded_low, size(lenna_gray));
imshow(decoded_image_low);
title('Received Image (0 dB SNR)');
received_high = awgn(lenna_bits, SNR_high, 'measured');
decoded_high = received_high < 0;
decoded_image_high = reshape(decoded_high, size(lenna_gray));
imshow(decoded_image_high);
title('Received Image (4 dB SNR)');