bdmtoolbox: Use Case #3: combining Matlab classes and BDM classes

Use Case #3: combining Matlab classes and BDM classes

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

The class bdm::mexEpdf has the following Matlab structure:

class = 'mexEpdf';
object = any_mexEpdf_object;

This clas acts as an interface between BDM objects of type bdm::epdf and Matlab objects of type mexEpdf.

Example:

clear all
f.class = 'mexEpdf';
f.object = mexLaplace;
f.object.mu =12;
f.object.b = 1;
f.object.rv = RV('b',1);
DS.class='EpdfDS';
DS.epdf =f; %U
experiment.ndat=10;
M=simulator(DS,experiment);
M.DS_dt_b

Here, Matlab class mexLaplace is created and plugged in as attribute object of bdm class 'mexEpdf'. Class bdm::EpdfDS accepts this kind of object and perfroms its task, i.e. it generates samples from the density.


Generated on Fri Aug 27 16:55:20 2010 for bdmtoolbox by  doxygen 1.6.0