|
Revision 1086, 0.9 kB
(checked in by smidl, 15 years ago)
|
|
doc
|
| Line | |
|---|
| 1 | /*! |
|---|
| 2 | \page bdt_mex_bdm Use Case #3: combining Matlab classes and BDM classes |
|---|
| 3 | |
|---|
| 4 | The classes written in Matlab can be combined with standard BDM classes via corresponding C++ classes with equal names, i.e. mexBM.m is accepted by C++ class mexBM |
|---|
| 5 | |
|---|
| 6 | The class bdm::mexEpdf has the following Matlab structure: |
|---|
| 7 | \code |
|---|
| 8 | class = 'mexEpdf'; |
|---|
| 9 | object = any_mexEpdf_object; |
|---|
| 10 | \endcode |
|---|
| 11 | |
|---|
| 12 | This clas acts as an interface between BDM objects of type bdm::epdf and Matlab objects of type mexEpdf. |
|---|
| 13 | |
|---|
| 14 | Example: |
|---|
| 15 | \code |
|---|
| 16 | clear all |
|---|
| 17 | |
|---|
| 18 | f.class = 'mexEpdf'; |
|---|
| 19 | f.object = mexLaplace; |
|---|
| 20 | f.object.mu =12; |
|---|
| 21 | f.object.b = 1; |
|---|
| 22 | f.object.rv = RV('b',1); |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | DS.class='EpdfDS'; |
|---|
| 26 | DS.epdf =f; %U |
|---|
| 27 | |
|---|
| 28 | experiment.ndat=10; |
|---|
| 29 | |
|---|
| 30 | M=simulator(DS,experiment); |
|---|
| 31 | |
|---|
| 32 | M.DS_dt_b |
|---|
| 33 | \endcode |
|---|
| 34 | |
|---|
| 35 | Here, Matlab class mexLaplace is created and plugged in as attribute \c object of bdm class 'mexEpdf'. |
|---|
| 36 | Class bdm::EpdfDS accepts this kind of object and perfroms its task, i.e. it generates samples from the density. |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | */ |
|---|