www.gusucode.com > UWB_matlab源码程序 > CP0703/cp0703_generate_mask.m
% % FUNCTION 7.10 : "cp0703_generate_mask" % % This function generates a discrete vector representing % the FCC indoor % emission mask for UWB devices % % The function receives as input: % 1) the number of points in the frequency domain 'N' % 2) the sampling frequency 'fs' % % The function returns a vector of N/2 points % 'emissionmask', representing the emission mask in the % frequency range [0 , fs/2] % % Programmed by Luca De Nardis function [emissionmask] = cp0703_generate_mask(N,fs) df = fs / N; % fundamental frequency emissionmask = zeros(N/2); n1 = round(0.96e9/df); n2 = round(1.61e9/df); n3 = round(1.99e9/df); n4 = round(3.1e9/df); n5 = round(10.6e9/df); a(1:n1)=-41.3; b(1:(n2-n1))=-75.3; c(1:(n3-n2))=-53.3; d(1:n4-n3)=-51.3; e(1:n5-n4)=-41.3; f(1:(N/2-n5))=-51.3; emissionmask=[a b c d e f]; positivefrequency=linspace(0, fs/2, N/2); semilogx(positivefrequency,emissionmask); axis([8e8 20e9 -78 -40]);