Revision 936, 0.9 kB
(checked in by smidl, 15 years ago)
|
missing file
|
Rev | Line | |
---|
[936] | 1 | class mexEpdf: public epdf{ |
---|
| 2 | protected: |
---|
| 3 | mxArray *data; |
---|
| 4 | public: |
---|
| 5 | mexEpdf() {}; |
---|
| 6 | void from_setting(const Setting &S) { |
---|
| 7 | Setting &So=S["object"]; |
---|
| 8 | data = (mxArray*)long(So); |
---|
| 9 | } |
---|
| 10 | void validate() { |
---|
| 11 | mexCallMATLAB(1, &data, 0, 0, "validate"); |
---|
| 12 | dim = mexCallMATLAB(1, &data, 0, 0, "dimension"); |
---|
| 13 | } |
---|
| 14 | vec mean() const { |
---|
| 15 | mxArray *tmp; |
---|
| 16 | mexCallMATLAB(1, &tmp, 1, (mxArray **) &data, "mean"); |
---|
| 17 | return mxArray2vec(tmp); |
---|
| 18 | } |
---|
| 19 | vec sample() const { |
---|
| 20 | mxArray *tmp; |
---|
| 21 | mexCallMATLAB(1, &tmp, 1, (mxArray **) &data, "sample"); |
---|
| 22 | return mxArray2vec(tmp); |
---|
| 23 | } |
---|
| 24 | double evallog(const vec &dt) const { |
---|
| 25 | mxArray *tmp; |
---|
| 26 | mexCallMATLAB(1, &tmp, 1, (mxArray **) &data, "evallog"); |
---|
| 27 | return mxArray2double(tmp); |
---|
| 28 | } |
---|
| 29 | vec variance() const { |
---|
| 30 | mxArray *tmp; |
---|
| 31 | mexCallMATLAB(1, &tmp, 1, (mxArray **) &data, "variance"); |
---|
| 32 | return mxArray2vec(tmp); |
---|
| 33 | } |
---|
| 34 | }; |
---|
| 35 | UIREGISTER(mexEpdf); |
---|