フィルターのクリア

discrete baseband channel model

10 ビュー (過去 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 Center および File ExchangeModulation についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by