Creating low pass filter

6 ビュー (過去 30 日間)
Shyngys Serikov
Shyngys Serikov 2022 年 3 月 14 日
回答済み: Sufiyan 2024 年 1 月 18 日
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 件のコメント
Shyngys Serikov
Shyngys Serikov 2022 年 3 月 14 日
編集済み: Walter Roberson 2022 年 3 月 14 日

サインインしてコメントする。

回答 (1 件)

Sufiyan
Sufiyan 2024 年 1 月 18 日
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;

カテゴリ

Help Center および File ExchangeDiscrete Fourier and Cosine Transforms についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by