writing matched filter to determine binary signal

18 ビュー (過去 30 日間)
Jacob Shamir
Jacob Shamir 2020 年 8 月 22 日
回答済み: Image Analyst 2020 年 8 月 25 日
Hello evreyone,
I have a question.
I have a signal passing binary valeus in two wave forms like that:
I have the " T " definning the time value of one bit in the sampling, in the signal array (how many sampels it's the length of one bit) in my case: T = 10000.
I need to define from the given signal two matched filters (both liniar), one for logical '0' and the other for the logical '1'. I need to plot the impulse rsponse of the two filters.
I also need to transfer the signal through both fillters and plot the output.
It's importent to mention that I am not alowed to use built in function of matlab.
for example:
Thank you.

採用された回答

Devineni Aslesha
Devineni Aslesha 2020 年 8 月 25 日
Hi Jacob,
Assuming that you do not want to use the inbuilt command for matched filter, here is the way to create signals, find the impulse response and get the signal output after passing through the matched filter.
% Input signal x(t)
rect1 = @(x,a) ones(1,numel(x)).*(abs(x)<a); % a is the width of the pulse
rect2 = @(x,a) -ones(1,numel(x)).*(abs(x)<a); % a is the width of the pulse
x = 1:1:1e4;
y1 = rect1(x,1e4);
y2 = rect2(x,1e4);
% Backward signal y1(-t), y2(-t)
newX = -1e4:1:-1;
newY1 = rect1(newX,1e4);
newY2 = rect2(newX,1e4);
figure(1)
subplot(2,1,1);
plot(x,y1,'c');
hold on;
plot(newX,newY1,'m');
subplot(2,1,2);
plot(x,y2,'c');
hold on;
plot(newX,newY2,'m');
% Impulse Response of matched filter y1(T-t)
% Shift the newY1 and newY2 to get the impulse response of y1 and y2
% Signal output after passing through the matched filter
% Convolute the shifted signal and y1 to get the filter output using conv. Similarly for y2.
For more information, refer the following links.

その他の回答 (1 件)

Image Analyst
Image Analyst 2020 年 8 月 25 日
You can use strfind(), even though they're numbers, not strings. Attach your data if you need more help.

カテゴリ

Help Center および File ExchangeMatched Filter and Ambiguity Function についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by