?? matched_filter.m
字號:
function [mf_data_block]=matched_filter(fs, T, pulsetype, in_data_block)% [mf_data_block]=matched_filter(fs, T, pulsetype, in_data_block)%% Output:% mf_data_block - Output block after matched-filtering.% % Input:% fs - Sampling frequency% T - Symbol period% pulsetype - One of: pulsetype=1 -> square% pulsetype=2 -> root-raised-cosine% pulsetype=3 -> hamming% pulsetype=4 -> raised-cosine% in_data_block - Down-converted data-block% % Short Theoretical Background for the Function:%% Performs the matched filtering of the down-converted signal.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Function part of simulation for Space-Time%%% coding project, group Grey-2001.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Author: Stefan Uppg錼d% Date: 2001-03-20% Version: 1.0% Revision (Name & Date): % FH 2001-03-21 see line 35% FH 2001-04-06 added raised-cosine pulsetype%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%oversamp = fs*T; % rev: T instead of 1/fc to get correct oversamp%%%%%% Selected pulsetype to matched-filter in_data_block to.%%%if pulsetype == 1 % copy of code from pulseshape.m p = ones(1,oversamp)/sqrt(oversamp);elseif pulsetype == 2 p = root_raised_cosine(oversamp);elseif pulsetype == 3 p = hamming(oversamp)';elseif pulsetype == 4 p = raised_cosine(oversamp);end%%%%%% Perform the matched-filtering by convolution.%%%mf_data_block = conv(p,in_data_block);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -