Ticket #19 (new task)

Opened 15 years ago

Last modified 15 years ago

Create Matlab offspring of BM

Reported by: smidl Owned by: miro
Priority: major Milestone: Mexify BDM
Component: bdm core Version:
Keywords: Cc: tynovsky@…, smidl@…

Description

Since object hierarchy does not prescribe any specific storage type, we may easily build a mex object that performs all its actions by calling matlab via mxCallMatlab.

For example Calass mexBM: public BM{}: attributes

mxArray O; // structure with all needed info string name;

methods

constructor expects to get O on its input (from UImexBM). //If O is wrong, bayes will fail

bayes calls 'name_bayes' which takes O and returns O // name_bayes should return ll which has to be copied into BM::ll

_epdf constructs new object of given type and copies appropriate fields from O

In this way, we will be able to call matlab functions from Matlab.

Change History

Changed 15 years ago by mido

  • owner changed from smidl to mido

Changed 15 years ago by mido

  • status changed from new to assigned

Changed 15 years ago by smidl

  • cc tynovsky@… added

New testbed for this ticket is committed in changeset:336

The main file is mexBM.cpp where the commented lines should be replaced by appropriate matlab calls.

The functions from directory mexBM should be called when mexBM("mexBM") is run from the matlab environment.

Changed 15 years ago by smidl

  • cc smidl@… added
  • owner changed from mido to miro
  • status changed from assigned to new

Changed 15 years ago by smidl

New test is in source:/applications/bdmtoolbox/tutorial/estimation/mexbm_test.m

The expected result is to have cumulative sum of input variable y from ArxDS in the logger.

Semi-steps:

  • rvs needs to be passed to posterior().rv()
  • default logit should be enough,

The expected matlab functions are almost identical to those in source:/applications/bdmtoolbox/mex/mexBM

Any other difficulties?

Note: See TracTickets for help on using tickets.