Changeset 411 for applications
- Timestamp:
- 07/02/09 22:16:20 (16 years ago)
- Location:
- applications/bdmtoolbox
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/bdmtoolbox/mex/config2mxstruct.cpp
r391 r411 1 1 #include <mex/config2mxstruct.h> 2 #include <base/user_info.h> 2 3 3 4 void mexFunction ( int n_output, mxArray *output[], int n_input, const mxArray *input[] ) { 4 string filename = mxArray2string(input[0]); 5 UImxConfig C (filename.c_str()); 6 output[0] = mxDuplicateArray(C.mxconfig); 5 if (n_input>0){ 6 string filename = mxArray2string(input[0]); 7 try{ 8 UImxConfig C (filename.c_str()); 9 if (n_output>0) 10 output[0] = mxDuplicateArray(C.mxconfig); 11 }catch(SettingException xcptn){ 12 cout<<"Error in:" + string(xcptn.getPath()) <<endl; 13 } 14 catch(exception e){ 15 cout <<e.what() <<endl; 16 } 17 } 7 18 } -
applications/bdmtoolbox/mex/merger.cpp
r407 r411 8 8 #endif 9 9 10 /*! \file 11 \brief Merging static pdfs 12 Merger is a program/mex-function for static merging of given pdfs on given support. 13 14 In command line, it expected config file with the following structure: 15 \code 16 Sources = (... any epdf or mpdf ...); 17 Support = {grid=([low1d,high1d],[low2d,high2d],...); 18 nbins=[bins1d,bins2d,... ]}; 19 // OR 20 Support = {pdf={class='epdf',...}; 21 nsamples=2}; 22 Merger = {class="merger_base",...} 23 \endcode 24 25 In mex-file, the above structures (Sources,Support,Merger) are input arguments. Type >>merger for help. 26 */ 27 10 28 using namespace bdm; 11 29 12 #ifdef MEX 30 #ifdef MEX 13 31 void mexFunction(int n_output, mxArray *output[], int n_input, const mxArray *input[]) 14 32 { -
applications/bdmtoolbox/tutorial/merging/merge_frag.m
r409 r411 11 11 12 12 % merger 13 merger.class='merger_mix';14 merger.method='lognormal';15 merger.beta=2;16 merger.ncoms=20;17 merger.stop_niter=5;18 merger.effss_coef=1;19 % merger.dbg_file='merger_mix_dbg';13 Merger.class='merger_mix'; 14 Merger.method='lognormal'; 15 Merger.beta=2; 16 Merger.ncoms=20; 17 Merger.stop_niter=5; 18 Merger.effss_coef=1; 19 %Merger.dbg_file='merger_mix_dbg'; 20 20 21 21 … … 35 35 36 36 % 2D 37 vy2=merger _mx({f3,f1}, support2, merger)37 vy2=merger({f3,f1}, support2, Merger) 38 38 X=zeros(support2.nbins(1)); 39 39 Y=zeros(support2.nbins(1));