gauss_pu.m
上传用户:jy88362166
上传日期:2015-04-26
资源大小:3k
文件大小:1k
- function [b,delay_GF,fig_no,sim_time] = gauss_pu(g,data,plot_control,fig_no);
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
% Filename : gauss_pu.m
%
% Function call : input =>[g,data,plot_control,figure_no]
% output=>[b,delay_GF,figure_no,sim_time]
%
% generates Gaussian filtered pulse train
%
%
% Input : g - Gaussian coefficient
% data - impulse train
% plot_control -
% figure_no -
% Output : b - Gaussian pulse waveform
% delay_GF - delay created by Gaussian filter
% figure_no
% local var :
% clear var :
%
% Author : Jeff Laster, MPRG, Virginia Tech
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
t0 = clock;
b = filter(g,1,data);
delay_GF = fix(length(g)/2);
- % print out
if (plot_control == 1 )
figure(fig_no);
subplot(1,1,1),plot(b);
title('Gaussian Filtered Pulse Train');
xlabel(' Time Pulse period = 20 ');
grid;
%print -dps fig1.ps;
fig_no = fig_no + 1;
end
sim_time = etime(clock,t0);
% end of this routine