Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

filter rayleigh channel

Status
Not open for further replies.

oussaki

Newbie level 3
Joined
Mar 4, 2013
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,297
hi to all,
I'm trying to write a matlab code for image transmission over a Rayleigh channel
Code:
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

my first question :is that true?
my second question :

I get an error in the instruction fl = filter (rayChan Obj, r)

Code:
Error in ==> channel.multipath.filterblock at 37
    y = filter(chan.ChannelFilter, x, z);

Error in ==> channel.multipath.filter at 100
    y(idx) = filterblock(chan, x(idx));
please help me it's urgent :oops:
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top