root/applications/bdmtoolbox/tutorial/estimation/my_pdf.m
@
976
Revision 933, 485 bytes (checked in by smidl, 15 years ago) |
---|
Line | |
---|---|
1 | classdef my_pdf |
2 | properties |
3 | mu |
4 | end |
5 | methods |
6 | function m=mean(p) |
7 | m=p.mu; |
8 | end |
9 | function validate(p) |
10 | if size(p.mu,2)>1 |
11 | error('mu must be scalar'); |
12 | end |
13 | end |
14 | function dim=dimension(p) |
15 | dim=size(mu,1); |
16 | end |
17 | function v=variance(p) |
18 | v=p.mu*p.mu; |
19 | end |
20 | function l=evallog_nn(p,x) |
21 | l=1/(abs(x-p.mu)+1); |
22 | end |
23 | end |
24 | end |
Note: See TracBrowser
for help on using the browser.