Reply by asim...@yahoo.com●February 18, 20062006-02-18
i want to design a raised cosine filter in passband..i-e after modulation
with the carrier of 10 MHz sin wave...here is my code
..........
f_c = 4; % Carrier frequency
j=1
for k=1:600 %length(sig),
for t=0:1/(20*f_c):1,
r(j)=spdata(k)*cos(2*pi*f_c*t); % BPSK (spdata is +1 or -1)
j=j+1;
end
end
over = 160; % oversampling factor
pulse = rcosine(80,over,'normal',0.35); % basic raised-cosine
pulse-shape
sig=rcosflt(r,80,over,'filter',pulse);
subplot(211)
plot(r)
subplot(212)
plot(sig)
..................
since u ppl dont have spdata so for trial basis try this code
clear;
clc;
f_c=4;
j=1;
w=1; % square pulse used for BPSK
for n=1:2,
for t=0:1/(20*f_c):1,
r(j)=w*cos(2*pi*f_c*t);
j=j+1;
end
w=-1;
end
over = 160; % oversampling factor
pulse = rcosine(80,over,'normal',0.35); % basic raised-cosine
pulse-shape
sig=rcosflt(r,80,over,'filter',pulse);
subplot(211)
plot(r)
subplot(212)
plot(sig)
.............................
but this is not working...i mean the results (when filter is in baseband and
when in passband) do not match...i tried it in simulink but FDAtool allows
raised cosine filter only as a lowpass filter...any sugesstions ?