KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Sinus.m
Go to the documentation of this file.
1 namespace general{
2 namespace functions{
3 
4 
5 /* (Autoinserted by mtoc++)
6  * This source code has been filtered by the mtoc++ executable,
7  * which generates code that can be processed by the doxygen documentation tool.
8  *
9  * On the other hand, it can neither be interpreted by MATLAB, nor can it be compiled with a C++ compiler.
10  * Except for the comments, the function bodies of your M-file functions are untouched.
11  * Consequently, the FILTER_SOURCE_FILES doxygen switch (default in our Doxyfile.template) will produce
12  * attached source files that are highly readable by humans.
13  *
14  * Additionally, links in the doxygen generated documentation to the source code of functions and class members refer to
15  * the correct locations in the source code browser.
16  * However, the line numbers most likely do not correspond to the line numbers in the original MATLAB source files.
17  */
18 
19 class Sinus
27  private:
28 
29  freq;
30 
31  foffset;
32 
33  voffset;
34 
35 
36  public:
37 
38  Sinus(freq,foffset,voffset) {
39  if nargin < 3
40  voffset = 0;
41  if nargin < 2
42  foffset = 0;
43  if nargin < 1
44  freq = 3;
45  end
46  end
47  end
48  this.freq= freq;
49  this.foffset= foffset;
50  this.voffset= voffset;
51  }
52 
53 
54  function [fhandle , dfhandle ] = getFunction() {
55  f = this.freq;
56  fo = this.foffset;
57  vo = this.voffset;
58  fhandle = @(t)sin(t/1000*f*2*pi+fo)+vo;
59  dfhandle = @(t)cos(t/1000*f*2*pi+fo);
60  }
61 
62 
63  function str = getConfigStr() {
64  str = sprintf(" Frequency: %g [Hz], ArgOffset: %g, valueOffset: %g ",...
65  this.freq,this.foffset,this.voffset);
66  }
67 
68 
69  public: /* ( Static ) */
70 
71  static function res = test_Sinus() {
72  f = general.functions.Sinus;
73  f.plot;
74  f = general.functions.Sinus(10,2,4);
75  f.plot;
76  res = true;
77  }
78 
79 
80 
81 };
82 }
83 }
84 
85 
86 
function str = getConfigStr()
Definition: Sinus.m:63
AFUNGEN Summary of this class goes here Detailed explanation goes here.
Definition: AFunGen.m:19
static function res = test_Sinus()
Definition: Sinus.m:71
Sinus(freq, foffset, voffset)
Definition: Sinus.m:38
function [ fhandle , dfhandle ] = getFunction()
Definition: Sinus.m:54