classdef my_pdf properties mu end methods function m=mean(p) m=p.mu; end function validate(p) if size(p.mu,2)>1 error('mu must be scalar'); end end function dim=dimension(p) dim=size(mu,1); end function v=variance(p) v=p.mu*p.mu; end function l=evallog_nn(p,x) l=1/(abs(x-p.mu)+1); end end end