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
MathMODMain.m
Go to the documentation of this file.
1 namespace models{
2 namespace mathmod2012{
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 function [m , r , d ] = MathMODMain(dim) {
20 
21 /* clear classes; */
22  if nargin == 0
23  dim = 240000;
24  end
25 
26  loc = " /home/dwirtz/aghhome/Diss/errorestimation/img ";
27 /* loc = 'C:/Users/CreaByte/Documents/Uni/img'; */
28 
29  /* in = 1; */
30 
31  m = models.mathmod2012.MathMODExperiment(dim);
32  m.offlineGenerations;
33  r = m.buildReducedModel;
34 
35  pm = PlotManager;
36  pm.FilePrefix= " mmod_noinput_ ";
37  pm.NoTitlesOnSave= true;
38  pm.AutoTickMarks= false;
39  pm.UseFileTypeFolders= false;
40 
41  /* % Estimation plots for fixed param */
43  d.EstimatorIterations= [1 2 5];
44  d.EstimatorVersions= [1 1 0 0 1 0 0 1 1];
45  d.setModel(r);
46 /* [e,re,ct] = d.compute([.5; 5; -.2], []);
47  * d.createPlots(e,re,ct,pm);
48  * pm.done;
49  * pm.savePlots(loc,'Format','eps'); */
50 
51  /* % Parameter sweeps
52  * Use TD estimator */
53  r.ErrorEstimator= d.Est(7).Estimator;
54  pm.ExportDPI= 300;
55 
56  /* Pure inner dynamics without inputs and initial value -.2
57  * ParamSweep(r, [0; 10; -.2], [], 2, 0:1:10, pm);
58  * pm.FilePrefix = 'mmod_exppar';
59  * pm.savePlots(loc,'Format',{'jpg','fig'},'Close',true); */
60 
61  /* Pure inner dynamics without inputs and initial value -.2 */
62  pm.FigureSize= [800 500];
63  ParamSweep(r, [0; 3; -.2], 1, 1, 0:.1:1, pm);
64  view(40,10);
65  pm.FilePrefix= " mmod_inputpar ";
66  pm.savePlots(loc," Format ",[" jpg "," fig "]," Close ",true);
67 
68  ParamSweep(r, [0; 4; -.2], 2, 1, 0:.1:1, pm);
69  pm.FilePrefix= " mmod_inputpar2 ";
70  view(42,32);
71  pm.savePlots(loc," Format ",[" jpg "," fig "]," Close ",true);
72 
73  ParamSweep2D(r, [0; 3; -.2], 1, [1 2], -.5:.2:1.5,-8:1.5:8, pm.nextPlot(" in_exp_2d "));
74  pm.FilePrefix= " mmod ";
75  pm.savePlots(loc," Format ",[" jpg "," fig "]," Close ",true);
76 end
77 }
92 };
93 };
function [ pm , Y , E ] = ParamSweep(rmodel, mu, inputidx, param, paramvals, pm)
ParamSweep: Plots the output with error bounds for a range of one specified parameter.
Definition: ParamSweep.m:17
PlotManager: Small class that allows the same plots generated by some script to be either organized a...
Definition: PlotManager.m:17
rowvec EstimatorIterations
How many estimator iterations should be performed?
function [ m , r , d ] = MathMODMain(dim)
Current version works with KerMor 0.6.
Definition: MathMODMain.m:19
Analysis class for the error estimators.
function [ h , Y , E ] = ParamSweep2D(rmodel, mu, inputidx,matrix< integer > params,rowvec< double > range1,rowvec< double > range2,handle ax)
ParamSweep: Plots the output with error bounds for a range of one specified parameter.
Definition: ParamSweep2D.m:17
char FilePrefix
A prefix that has to be put before each file name for exported plots.
Definition: PlotManager.m:146