필터 지우기
필터 지우기

discrete baseband channel model

조회 수: 2 (최근 30일)
Jose Iglesias
Jose Iglesias 2023년 3월 8일
댓글: Jose Iglesias 2023년 3월 16일
Creating Matlab code for the following problem statement shown below. This is for a discrete baseband channel model lth (complex) channel filter tap. There is an iteration for the gains (a) and the delays (tau) and their values are shown below in the Matlab code that needs revising. I want it to run through each value of a and tau from the first to the last for the iteration.I need help tweaking the code so it can plot the amplitude of the channel model vs l. The Matlab code that needs revising is shown below. The bandwith is 200 kHz.Thank you in advance.
% Define the range of l values
l = -5:5;
f = 100000;
W = 200E3;
tau = [.2387 4E-6 3.40E-6 3.667E-6 3.59E-6];
a = [.2387 -.2 -.2341 -.217 -.222];
a*b = a(i)*exp*(-i*2*pi*f*tau(i));
% Compute the discrete baseband channel model h
h = zeros(size(l));
for idx = 1:length(l)
for i = 1:length(a)
h(idx) = h(idx) + (1i*a(i)*b(i)/W)*sinc(l(idx)-tau(i)*W);
end
end
% Plot the amplitude of h vs l
stem(l, abs(h));
xlabel('l');
ylabel('|h_l|');
title('Amplitude of the Discrete Baseband Channel Model');

채택된 답변

Zuber
Zuber 2023년 3월 15일
Hi,
I understand that you want to plot the amplitude of the channel model vs l. In the code, the variable a*b’ is not a valid variable name, and is replaced by ‘a_b’ in the code below. The definition of a*b’ accesses the index of vector ‘a’ and ‘tau’, so it should be inside the for loop. Also, the code for h(idx) is not as per the definition of ’. Following code can be used to get the correct ‘a_b’ and ‘h’ values : -
for idx = 1:length(l)
for i = 1:length(a)
a_b = a(i)*exp(-1i*2*pi*f*tau(i));
h(idx) = h(idx) + (a_b*(idx/W)*sinc(l(idx)-tau(i)*(idx/W)*W));
end
end
I hope this resolves your query.
  댓글 수: 1
Jose Iglesias
Jose Iglesias 2023년 3월 16일
Thank you very much for your help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modulation에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by