Mercurial > octave-nkf
comparison scripts/statistics/base/skewness.m @ 17590:a53a97faf61a
skewness.m: Fix comment
* scripts/statistics/base/skewness.m: Fix comment
author | Julien Bect <julien.bect@supelec.fr> |
---|---|
date | Mon, 07 Oct 2013 21:10:36 +0200 |
parents | a13ff4521538 |
children | 8f2f8c9b2620 |
comparison
equal
deleted
inserted
replaced
17589:c3aadd228c37 | 17590:a53a97faf61a |
---|---|
115 y = sum (x .^ 3, dim); | 115 y = sum (x .^ 3, dim); |
116 idx = (s != 0); | 116 idx = (s != 0); |
117 y(idx) ./= (n * s(idx) .^ 3); | 117 y(idx) ./= (n * s(idx) .^ 3); |
118 y(! idx) = NaN; | 118 y(! idx) = NaN; |
119 | 119 |
120 ## Apply bias correction to the third central sample moment | 120 ## Apply bias correction to the second and third central sample moment |
121 if (flag == 0) | 121 if (flag == 0) |
122 if (n > 2) | 122 if (n > 2) |
123 y *= sqrt (n * (n - 1)) / (n - 2); | 123 y *= sqrt (n * (n - 1)) / (n - 2); |
124 else | 124 else |
125 y(:) = NaN; | 125 y(:) = NaN; |
163 %!error <FLAG must be 0 or 1> skewness (1, [1 0]) | 163 %!error <FLAG must be 0 or 1> skewness (1, [1 0]) |
164 %!error <DIM must be an integer> skewness (1, [], ones (2,2)) | 164 %!error <DIM must be an integer> skewness (1, [], ones (2,2)) |
165 %!error <DIM must be an integer> skewness (1, [], 1.5) | 165 %!error <DIM must be an integer> skewness (1, [], 1.5) |
166 %!error <DIM must be .* a valid dimension> skewness (1, [], 0) | 166 %!error <DIM must be .* a valid dimension> skewness (1, [], 0) |
167 %!error <DIM must be .* a valid dimension> skewness (1, [], 3) | 167 %!error <DIM must be .* a valid dimension> skewness (1, [], 3) |
168 |