MATLAB code for channel impulse response estimation using FFT-based channel estimation method % The code is developed by SalimWireless.com clc; clear all; close all; % Parameters N = 128; % Signal length epsilon = 1e-3; % Regularization term useWhiteNoise = true; % Set false to use delta function probe SNR_dB = 100; % Signal-to-Noise Ratio in dB % True channel (FIR with 3 taps) true_h = [0.8, 0.5+0.3j, 0.2, 0.1]; L = length(true_h); % Generate probe signal if useWhiteNoise x = randn(1, N); % White noise else x = zeros(1, N); % Delta function x(1) = 1; end % Pass through the channel (linear convolution) y_clean = conv(x, true_h, 'same'); % Add AWGN signal_power = mean(abs(y_clean).^2); noise_power = signal_power / (10^(SNR_dB/10)); noise = sqrt(noise_power/2) * (randn(1, N) + 1j * randn(1, N)); y_noisy = y_clean + noise; % FFTs Xf = fft(x); Yf = fft(y_noisy); % Estimate channel frequency response with regula...