Creating low pass filter
Show older comments
How do I create anti aliasing low pass filter shown in the figure? So far I have coded root raised cosine in frequency domain:
%Generating Root Raised Cosine Pulse in Frequency Domain
T=0.1*10^-3; %symbol period
alpha=0.5; %roll-off factor
N=10/T;
f=linspace(-1/T,1/T,N+1);
% Generation of the raised cosine pulse using the formula in Lecture
Q=zeros(size(f));
Q(abs(f)<=1/2/T*(1-alpha))=T;
Q(abs(f)<=1/2/T*(1+alpha) & abs(f)>=1/2/T*(1-alpha))=T/2*(1- sin(T/2/alpha*(2*pi*abs(f... (abs(f)<=1/2/T*(1+alpha) & abs(f)>=1/2/T*(1-alpha)))-pi/T)));
%Plot
plot(f,sqrt(Q));
xlabel('frequency[Hz]', 'FontSize', 11);
ylabel('Amplitude', 'FontSize', 11);
title('Root Raised Cosine Pulse', 'Fontsize', 11);
grid on
axis square;
hold on;
%Keep when comparing graphs with different roll-off factors
1 Comment
Shyngys Serikov
on 14 Mar 2022
Edited: Walter Roberson
on 14 Mar 2022
Answers (1)
Sufiyan
on 18 Jan 2024
You can try this
q_time = ifftshift(ifft(Q, 'symmetric')); % Inverse FFT with ifftshift
t = linspace(-5*T, 5*T, N);
plot(t, q_time);
xlabel('Time [s]', 'FontSize', 11);
ylabel('Amplitude', 'FontSize', 11);
title('Time Domain', 'Fontsize', 11);
grid on;
axis square;

Categories
Find more on Discrete Fourier and Cosine Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!