File: SetCustomExcite.m

package info (click to toggle)
openems 0.0.35+dfsg.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,288 kB
  • sloc: cpp: 40,259; yacc: 580; lex: 350; makefile: 258; sh: 169; ruby: 19
file content (21 lines) | stat: -rw-r--r-- 602 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function FDTD = SetCustomExcite(FDTD,f0,funcStr)
% function FDTD = SetCustomExcite(FDTD,f0,funcStr)
%
% f0 : nyquist rate
% funcStr : string desribing the excitation function e(t)
%
% see also SetSinusExcite SetGaussExcite
%
% e.g for a ramped sinus excite...
% T = 1/f0;
% FDTD = SetCustomExcite(FDTD,1e9,..
% [ '(1-exp(-1*(t/' num2str(T) ')^2) ) * sin(2*pi*' num2str(f0) '*t)' ]);
%
% openEMS matlab interface
% -----------------------
% author: Thorsten Liebig

FDTD.Excitation.ATTRIBUTE.Type=10;
FDTD.Excitation.ATTRIBUTE.f0=f0;
FDTD.Excitation.ATTRIBUTE.Function=funcStr;
FDTD.ATTRIBUTE.f_max=f0;