comparison scripts/statistics/base/statistics.m @ 10549:95c3e38098bf

Untabify .m scripts
author Rik <code@nomad.inbox5.com>
date Fri, 23 Apr 2010 11:28:50 -0700
parents eb63fbe60fab
children cab3b148d4e4
comparison
equal deleted inserted replaced
10548:479536c5bb10 10549:95c3e38098bf
48 if (dim > nd) 48 if (dim > nd)
49 dim = 1; 49 dim = 1;
50 endif 50 endif
51 else 51 else
52 if (! (isscalar (dim) && dim == round (dim)) 52 if (! (isscalar (dim) && dim == round (dim))
53 && dim > 0 53 && dim > 0
54 && dim < (nd + 1)) 54 && dim < (nd + 1))
55 error ("statistics: dim must be an integer and valid dimension"); 55 error ("statistics: dim must be an integer and valid dimension");
56 endif 56 endif
57 endif 57 endif
58 58
59 if (! ismatrix (X) || sz(dim) < 2) 59 if (! ismatrix (X) || sz(dim) < 2)
61 endif 61 endif
62 62
63 emp_inv = quantile (X, [0.25; 0.5; 0.75], dim, 7); 63 emp_inv = quantile (X, [0.25; 0.5; 0.75], dim, 7);
64 64
65 S = cat (dim, min (X, [], dim), emp_inv, max (X, [], dim), mean (X, dim), 65 S = cat (dim, min (X, [], dim), emp_inv, max (X, [], dim), mean (X, dim),
66 std (X, [], dim), skewness (X, dim), kurtosis (X, dim)); 66 std (X, [], dim), skewness (X, dim), kurtosis (X, dim));
67 67
68 endfunction 68 endfunction
69 69
70 %!test 70 %!test
71 %! x = rand(7,5); 71 %! x = rand(7,5);