clear all;
clc;
sampleTime = 1/500000; % Sample time (s)
maxDopplerShift = 200; % Maximum Doppler shift of diffuse components (Hz)
delayVector = 1.0e-004 * [0 0.0400 0.0800 0.1200]; % Discrete delays of
% four-path channel (s)
gainVector = [0 -3 -6 -9]; % Average path gains (dB)
% Create Rayleigh channel object
rayChanObj = rayleighchan(sampleTime, maxDopplerShift, delayVector,...
gainVector)
rayChanObj.StoreHistory = 1; % Store channel state information as signal is
% processed for later visualization
myImage=imread('cameraman.tif');
[ligne colonne]=size(myImage)
figure(1);
imshow(myImage);
sigma = std2(myImage)
for i=1:500% applicate noise
x = randi(size(myImage, 1));
y = randi(size(myImage, 2));
myImage(x,y) = normrnd(myImage(x, y), sigma);
end
r=[];
for i=1:ligne
r=[r myImage(i,:)];% convert image to vector
end
fl=filter(rayChanObj,r) % applicate filter
tt=vec2mat(fl,colonne); % convert to matrix
figure(3);
imshow(tt); show the new image after transmission