summaryrefslogtreecommitdiff
path: root/openEMS/matlab/SetGaussExcite.m
diff options
context:
space:
mode:
Diffstat (limited to 'openEMS/matlab/SetGaussExcite.m')
-rw-r--r--openEMS/matlab/SetGaussExcite.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/openEMS/matlab/SetGaussExcite.m b/openEMS/matlab/SetGaussExcite.m
new file mode 100644
index 0000000..be650ba
--- /dev/null
+++ b/openEMS/matlab/SetGaussExcite.m
@@ -0,0 +1,18 @@
+function FDTD = SetGaussExcite(FDTD,f0,fc)
+% function FDTD = SetGaussExcite(FDTD,f0,fc);
+%
+% f0 : center frequency
+% fc : 20dB cutoff frequency --> bandwidth is 2*fc
+%
+% see also SetSinusExcite SetCustomExcite
+%
+% e.g FDTD = SetGaussExcite(FDTD,1e9,1e8);
+%
+% openEMS matlab interface
+% -----------------------
+% author: Thorsten Liebig
+
+FDTD.Excitation.ATTRIBUTE.Type=0;
+FDTD.Excitation.ATTRIBUTE.f0=f0;
+FDTD.Excitation.ATTRIBUTE.fc=fc;
+FDTD.ATTRIBUTE.f_max=f0+fc;