repl.txt (1329B)
1 2 {{alias}}( t, μ, s ) 3 Evaluates the moment-generating function (MGF) for a raised cosine 4 distribution with location parameter `μ` and scale parameter `s` at a value 5 `t`. 6 7 If provided `NaN` as any argument, the function returns `NaN`. 8 9 If provided `s <= 0`, the function returns `NaN`. 10 11 Parameters 12 ---------- 13 t: number 14 Input value. 15 16 μ: number 17 Location parameter. 18 19 s: number 20 Scale parameter. 21 22 Returns 23 ------- 24 out: number 25 Evaluated MGF. 26 27 Examples 28 -------- 29 > var y = {{alias}}( 2.0, 0.0, 3.0 ) 30 ~7.234 31 > y = {{alias}}( 9.0, 10.0, 3.0 ) 32 ~1.606e+47 33 34 > y = {{alias}}( 0.5, 0.0, NaN ) 35 NaN 36 > y = {{alias}}( 0.5, NaN, 1.0 ) 37 NaN 38 > y = {{alias}}( NaN, 0.0, 1.0 ) 39 NaN 40 41 42 {{alias}}.factory( μ, s ) 43 Returns a function for evaluating the moment-generating function (MGF) of a 44 raised cosine distribution with location parameter `μ` and scale parameter 45 `s`. 46 47 Parameters 48 ---------- 49 μ: number 50 Location parameter. 51 52 s: number 53 Scale parameter. 54 55 Returns 56 ------- 57 mgf: Function 58 Moment-generating function (MGF). 59 60 Examples 61 -------- 62 > var mymgf = {{alias}}.factory( 3.0, 1.5 ); 63 > var y = mymgf( 1.9 ) 64 ~495.57 65 66 See Also 67 -------- 68