Mercurial > octave-nkf
comparison scripts/statistics/distributions/cauchy_pdf.m @ 10549:95c3e38098bf
Untabify .m scripts
author | Rik <code@nomad.inbox5.com> |
---|---|
date | Fri, 23 Apr 2010 11:28:50 -0700 |
parents | 3306cfcb856e |
children | c776f063fefe |
comparison
equal
deleted
inserted
replaced
10548:479536c5bb10 | 10549:95c3e38098bf |
---|---|
52 k = find ((x > -Inf) & (x < Inf) & (location > -Inf) & | 52 k = find ((x > -Inf) & (x < Inf) & (location > -Inf) & |
53 (location < Inf) & (scale > 0) & (scale < Inf)); | 53 (location < Inf) & (scale > 0) & (scale < Inf)); |
54 if (any (k)) | 54 if (any (k)) |
55 if (isscalar (location) && isscalar (scale)) | 55 if (isscalar (location) && isscalar (scale)) |
56 pdf(k) = ((1 ./ (1 + ((x(k) - location) ./ scale) .^ 2)) | 56 pdf(k) = ((1 ./ (1 + ((x(k) - location) ./ scale) .^ 2)) |
57 / pi ./ scale); | 57 / pi ./ scale); |
58 else | 58 else |
59 pdf(k) = ((1 ./ (1 + ((x(k) - location(k)) ./ scale(k)) .^ 2)) | 59 pdf(k) = ((1 ./ (1 + ((x(k) - location(k)) ./ scale(k)) .^ 2)) |
60 / pi ./ scale(k)); | 60 / pi ./ scale(k)); |
61 endif | 61 endif |
62 endif | 62 endif |
63 | 63 |
64 endfunction | 64 endfunction |