writing matched filter to determine binary signal
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jacob Shamir
am 22 Aug. 2020
Beantwortet: Image Analyst
am 25 Aug. 2020
Hello evreyone,
I have a question.
I have a signal passing binary valeus in two wave forms like that:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/349946/image.jpeg)
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/349949/image.jpeg)
Thank you.
0 Kommentare
Akzeptierte Antwort
Devineni Aslesha
am 25 Aug. 2020
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.
0 Kommentare
Weitere Antworten (1)
Image Analyst
am 25 Aug. 2020
You can use strfind(), even though they're numbers, not strings. Attach your data if you need more help.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Predictive Maintenance Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!