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
Model.m
Go to the documentation of this file.
1 namespace models{
2 namespace motoneuron{
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 Model
20  :public models.BaseFullModel {
45  public: /* ( Constant ) */
46 
47  static const FILE_UPPERLIMITPOLY = fullfile("fileparts(mfilename('fullpath')),'upperlimitpoly.mat'");
48 
49 
50  public: /* ( Dependent ) */
51 
53 
54 
55  public:
56 
80  public:
81 
82  Model(limit_meancurrent) {
83  if nargin < 1
84  limit_meancurrent = true;
85  end
86  this.FibreTypeDepMaxMeanCurrent= limit_meancurrent;
87  /* Creates a new motoneuron model
88  * */
89  this.Name= " Motoneuron model ";
90  this.System= models.motoneuron.System(this);
91  this.TrainingInputs= 1;
92  this.SaveTag= " motoneuron ";
93  this.Data= data.ModelData(this);
94 
95  this.T= 150; /* [ms] */
96 
97  this.dt= .1; /* [ms] */
98 
99 
100  this.ODESolver= solvers.MLWrapper(@ode15s);
101 
102  this.DefaultMu= [.1; 3];
103  this.DefaultInput= 1;
104  }
105 
106 
107  function varargout = plot(varargin) {
108  [varargout[1:nargout]] = this.System.plot(varargin[:]);
109  }
120  public:
121 
122 
123 #if 0 //mtoc++: 'get.UseNoise'
124 function value = UseNoise() {
125  value = ~this.System.noiseGen.DisableNoise;
126  }
127 
128 #endif
129 
130 
131 
132 #if 0 //mtoc++: 'set.UseNoise'
133 function UseNoise(value) {
134  this.System.noiseGen.DisableNoise= ~value;
135  }
136 
137 #endif
138 
139 
140  public: /* ( Static ) */
141 
142  static function res = test_Motoneuron() {
143  m = models.motoneuron.Model;
144  [t,y] = m.simulate;
145  m.plot(t,y);
146  res = true;
147  }
148 
149 
150  protected: /* ( Static ) */
151 
152  static function this = loadobj() {
153  if ~isa(this, " models.motoneuron.Model ")
154  sobj = this;
155  this = models.motoneuron.Model;
156  this = loadobj@models.BaseFullModel(this, sobj);
157  else
158  this = loadobj@models.BaseFullModel(this);
159  end
160  }
161 
162 
168 };
169 }
170 }
171 
char Name
The name of the Model.
Definition: BaseModel.m:117
function pm = plot(double t,matrix< double > y, pm)
Definition: System.m:184
MotoModel: Motoneuron model.
Definition: Model.m:19
The base class for any KerMor detailed model.
Definition: BaseFullModel.m:18
double dt
The desired time-stepsize for simulations.
Definition: BaseModel.m:291
integer TrainingInputs
The indices of inputs to use for training data generation. Uses the DefaultInput if not set (and Defa...
models.BaseFirstOrderSystem System
The actual dynamical system used in the model.
Definition: BaseModel.m:102
logical FibreTypeDepMaxMeanCurrent
Flag that determines if the mean current parameter is constrained depending on the fibre type paramet...
Definition: Model.m:57
static const FILE_UPPERLIMITPOLY
Definition: Model.m:47
System(models.BaseFullModel model)
Call superclass constructor.
Definition: System.m:109
A boolean value.
static function this = loadobj()
Definition: Model.m:152
A variable number of input arguments.
static function res = test_Motoneuron()
Definition: Model.m:142
solvers.BaseSolver ODESolver
The solver to use for the ODE. Must be an instance of any solvers.BaseSolver subclass.
Definition: BaseModel.m:315
integer DefaultInput
The default input to use if none is given.
Definition: BaseModel.m:189
MotoSystem: The global dynamical system used within the MotoModel.
Definition: System.m:19
double T
The final timestep up to which to simulate.
Definition: BaseModel.m:271
data.ModelData Data
The full model's data container. Defaults to an empty container.
ModelData(varargin)
Creates a new container for large full model data.
Definition: ModelData.m:180
colvec< double > DefaultMu
The default parameter value if none is given.
Definition: BaseModel.m:355
function varargout = plot(varargin)
plots some interesting states of the model
Definition: Model.m:107
Model(limit_meancurrent)
Definition: Model.m:82
char SaveTag
A custom tag that can be used as a prefix to files for corresponding model identification.
A variable number of output arguments.