Using DREAM ›› DREAM plugins ››
Parent Previous Next

DREAM Suite plugin modules can also be implemented in MATLAB script files (*.m). To prepare such a plugin, take the following steps:

  1. On the Model Definition page, select plugin type MATLAB COM or MATLAB Engine. MATLAB COM interface is more general in terms of combining 32-bit/64-bit program versions, i.e. you can then use 64-bit MATLAB with 32-bit DREAM Suite, which is not possible with the MATLAB Engine interface (64-bit MATLAB requires 64-bit DREAM Suite). On the other hand, the MATLAB Engine interface is a bit faster than MATLAB COM (but still significantly slower than C/C++ plugins).

Figure 5.3.2. MATLAB Plugin Type

  1. Create two *.m files named according to the project name in the Src_Matlab subdirectory. The first file (e.g. Example01.m) should contain definitions of DREAM parameters and the second file (Example01_Evaluate.m) contains the function for evaluations of proposals. Names of DREAM parameters are identical with names described in the DREAM Suite technical manual or in the manual for MATLAB Implementation of DREAM (J.Vrugt).  

Figure 5.3.3. MATLAB files

Figure 5.3.4. MATLAB file with DREAM Parameters

Figure 5.3.5. MATLAB file with the evaluation function

Remarks on using the MATLAB interface