diff scripts/statistics/distributions/laplace_pdf.m @ 3456:434790acb067

[project @ 2000-01-19 06:58:51 by jwe]
author jwe
date Wed, 19 Jan 2000 06:59:23 +0000
parents f8dde1807dee
children 38c61cbf086c
line wrap: on
line diff
--- a/scripts/statistics/distributions/laplace_pdf.m	Tue Jan 18 19:57:13 2000 +0000
+++ b/scripts/statistics/distributions/laplace_pdf.m	Wed Jan 19 06:59:23 2000 +0000
@@ -14,13 +14,14 @@
 ## along with this file.  If not, write to the Free Software Foundation,
 ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-## usage:  laplace_pdf (x)
-##
-## For each element of x, compute the probability density function (PDF)
-## at x of the Laplace distribution.
+## -*- texinfo -*-
+## @deftypefn {Function File} {} laplace_pdf (@var{x})
+## For each element of @var{x}, compute the probability density function
+## (PDF) at @var{x} of the Laplace distribution.
+## @end deftypefn
 
-## Author:  KH <Kurt.Hornik@ci.tuwien.ac.at>
-## Description:  PDF of the Laplace distribution
+## Author: KH <Kurt.Hornik@ci.tuwien.ac.at>
+## Description: PDF of the Laplace distribution
 
 function pdf = laplace_pdf (x)
 
@@ -34,12 +35,12 @@
   pdf = zeros (1, s);
 
   k = find (isnan (x));
-  if any (k)
+  if (any (k))
     pdf(k) = NaN * ones (1, length (k));
   endif
 
   k = find ((x > -Inf) & (x < Inf));
-  if any (k)
+  if (any (k))
     pdf(k) = exp (- abs (x(k))) / 2;
   endif