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
create_testdata.m
Go to the documentation of this file.
1 
2 
3 /* (Autoinserted by mtoc++)
4  * This source code has been filtered by the mtoc++ executable,
5  * which generates code that can be processed by the doxygen documentation tool.
6  *
7  * On the other hand, it can neither be interpreted by MATLAB, nor can it be compiled with a C++ compiler.
8  * Except for the comments, the function bodies of your M-file functions are untouched.
9  * Consequently, the FILTER_SOURCE_FILES doxygen switch (default in our Doxyfile.template) will produce
10  * attached source files that are highly readable by humans.
11  *
12  * Additionally, links in the doxygen generated documentation to the source code of functions and class members refer to
13  * the correct locations in the source code browser.
14  * However, the line numbers most likely do not correspond to the line numbers in the original MATLAB source files.
15  */
16 
17 function create_testdata() {
18 k = kernels.KernelExpansion;
19 
20 nc = randi(200);
21 xdim = randi(200);
22 fdim = randi(200);
23 
24 k.Centers.xi= rand(xdim, nc) * 10;
25 k.Ma= (rand(fdim, nc)-.5) * 20;
26 
27 /* Gaussian */
28 k.Kernel= kernels.GaussKernel(xdim + rand(1)*10);
29 dir = fullfile(" test "," gaussian ");
30 k.exportToDirectory(dir);
31 x = rand(xdim,randi(200));
32 Util.saveRealMatrix(x," points.bin ",dir);
33 fx = k.evaluate(x);
34 Util.saveRealMatrix(fx," eval.bin ",dir);
35 
36 /* Wendland */
37 ke = kernels.Wendland;
38 ke.Gamma= xdim + rand(1)*10;
39 ke.d= xdim;
40 ke.k= 3;
41 k.Kernel= ke;
42 dir = fullfile(" test "," wendland ");
43 k.exportToDirectory(dir);
44 x = rand(xdim,randi(200));
45 Util.saveRealMatrix(x," points.bin ",dir);
46 Util.saveRealMatrix(k.evaluate(x)," eval.bin ",dir);
47 }
48 
function create_testdata()
Util: Utility functions for export of matrices and vectors to files.
Definition: Util.m:17
static function saveRealMatrix(mat, file, folder)
Stores a real double matrix in little endian format.
Definition: Util.m:52