root/applications/bdmtoolbox/mex/epdf_1dplot.m @ 1101

Revision 1083, 455 bytes (checked in by smidl, 14 years ago)

Mergers + fixes

Line 
1function h=epdf_1dplot(pdf,xlims, points)
2% function evaluates given pdf on support
3%  xlims = [x_begin, x_end] --or-- empty
4%  points = if not given, 100
5
6if nargin<3
7    points = 100;
8end
9
10if nargin<2 | isempty(xlims)
11    p_mean = epdf_mean(pdf);
12    p_var  = epdf_variance(pdf);
13    xlims = p_mean(1)*[1 1] + [-3 3]*sqrt(p_var(1));
14end
15
16steps = [xlims(2)-xlims(1)];
17x = xlims(1):steps/(points-1):xlims(2);
18v = epdf_evallog_mat(pdf,x);
19h=plot(x,exp(v));
Note: See TracBrowser for help on using the browser.