⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gaussian_pulse.m

📁 1D的有限差分时域法计算电磁波散射c语言模拟程序
💻 M
字号:
% function p=Gaussian_pulse(dt,f_c,len)
%
% The function creates a Gaussian pulse centered at frequency fc
% It assumes a sample frequency of fs = 1/dt
%
% the pulse vector will be of length len; specify too short of a value for len
% and an error will be generated; delay is needed before the start of the pulse
% to reduce the step function transient created at t=0
%
% the resulting pulse has a lowpass characteristic with a 3 dB bandwidth f_c 
% (i.e. extending from roughly DC to f_c)
%
% Originally Written by Michael Tompkins, Asst. Prof at USU Fall 2004
% Minor modifications by Aroh Barjatya

function p=Gaussian_pulse(dt,f_c,len)
if 0
   Gaussian_pulse(1e-7,2e5,15000);
   Gaussian_pulse(1.6e-10,30e6,15000);
end

spread = 1/2/pi/f_c/dt;  % this is the standard deviation of our Gaussian function

% must wait a while to launch the pulse so that we don't get too big of a 
% "jump" (step function) at t=0;  this step has higher frequency harmonics
% in it that will not meet our requirement that dx << lambda

delay = 5*spread;  
if delay>len
   error('Need longer simulation to accommodate desired pulse');
end

n = 0:len-1;
p = exp(-((n-delay)/spread).^2);  % Gaussian pulse

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -