# This routine illustrates the mean and median for Gaussian distributed random numbers.
function gauss_example(npts,fignum,showmedian)
	figure(fignum)
	hold off
	clf
	dat=normrnd(0,1,npts,1);
	hist(dat,[-5:.25:5])
	hold on
	hold on
	plot(mean(dat),0,'.d','markersize',15)
	if (showmedian == 1)
		plot(median(dat),0,'.o','markersize',15)
		legend("","Mean","Median")
	else
		legend("","Mean")
	endif
	title(sprintf("Gaussian Distribution Histogram, %i points",npts));
	hold off
endfunction