perform interpolation using an ideal root raised cosine filter in the frequency domain in matlab

To perform interpolation using an ideal root raised cosine filter in the frequency domain, you can follow these steps in MATLAB:

  1. Define the input signal and the up-sampling factor:
main.m
x = [1 2 3 4];     % Input signal
L = 4;             % Up-sampling factor
74 chars
3 lines
  1. Define the ideal root raised cosine filter in the frequency domain:
main.m
N = length(x);        % Length of input signal
T = N + (N-1)*(L-1);  % Length of up-sampled signal
F = (0:T-1)/T;        % Frequency vector

% Define the transfer function of the RRC filter in the frequency domain
H_rrc = sqrt(L)*sinc(F/L).*sqrt(cos(pi*F/L).^2 + (2*L*F/sqrt(2*pi)).^2);
287 chars
7 lines
  1. Compute the Fourier transform of the input signal:
main.m
X = fft(x, T);  % Fourier transform of input signal
52 chars
2 lines
  1. Apply frequency domain filtering:
main.m
Y = X.*H_rrc;  % Filtered spectrum
35 chars
2 lines
  1. Compute the inverse Fourier transform of the filtered signal:
main.m
y = ifft(Y);  % Filtered signal
32 chars
2 lines

The resulting signal y is the up-sampled and interpolated version of the original signal x, filtered with an ideal root raised cosine filter.

gistlibby LogSnag