% load data created by the MpdfDS_example
clear all
load pdfds_results

DS.class   = 'MemDS';
DS.Data    = Data;
DS.drv     = drv;

%%%%%% Laplace estimator

L.class = 'mexBM';
L.object = mexLaplaceBM;
L.object.rvy = y;
L.object = validate(L.object);
L.log_level = 'logmean';

M=estimator(DS,{L});

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% plot results
plot(M.L_mean)