repl.txt (1353B)
1 2 {{alias}}( x, sigma ) 3 Evaluates the logarithm of the probability density function (PDF) for a 4 Rayleigh distribution with scale parameter `sigma` at a value `x`. 5 6 If provided `NaN` as any argument, the function returns `NaN`. 7 8 If provided a negative value for `sigma`, the function returns `NaN`. 9 10 Parameters 11 ---------- 12 x: number 13 Input value. 14 15 sigma: number 16 Scale parameter. 17 18 Returns 19 ------- 20 out: number 21 Evaluated logPDF. 22 23 Examples 24 -------- 25 > var y = {{alias}}( 0.3, 1.0 ) 26 ~-1.249 27 > y = {{alias}}( 2.0, 0.8 ) 28 ~-1.986 29 > y = {{alias}}( -1.0, 0.5 ) 30 -Infinity 31 > y = {{alias}}( 0.0, NaN ) 32 NaN 33 > y = {{alias}}( NaN, 2.0 ) 34 NaN 35 // Negative scale parameter: 36 > y = {{alias}}( 2.0, -1.0 ) 37 NaN 38 39 40 {{alias}}.factory( sigma ) 41 Returns a function for evaluating the logarithm of the probability density 42 function (PDF) of a Rayleigh distribution with scale parameter `sigma`. 43 44 Parameters 45 ---------- 46 sigma: number 47 Scale parameter. 48 49 Returns 50 ------- 51 logpdf: Function 52 Logarithm of probability density function (PDF). 53 54 Examples 55 -------- 56 > var mylogpdf = {{alias}}.factory( 4.0 ); 57 > var y = mylogpdf( 6.0 ) 58 ~-2.106 59 > y = mylogpdf( 4.0 ) 60 ~-1.886 61 62 See Also 63 -------- 64