NB. If you have got a bunch of numbers ]n=.?20#10035 32 66 37 94 56 44 30
25 70 27 68 49 92 96 79 74 99 72 22NB. and you want to simplify, then take the
mean value
1 simplify n58.35
NB. or take the mean value minus (or plus) the standard deviation 3": 2
simplify n 33 84NB. or take three numbers having the same mean value and the
same standard deviation and the same skewness as the original numbers
3": 3 simplify n
28 56 90NB. and so on:
3": 4 simplify n
26 46 68 94 3": 5 simplify n 25 37 60 75 96 1 simplify 5 simplify n
58.35NB. I think this simplify verb is cute and perhaps even useful, so I am
sharing it with you.
simplify=. 4 : 0
y=.x*}.(%{.)+/y^/i.>:x
x=.1
for.y do.x=.((-/x*(#x){.y)%#x),x end.
-|.>{:p.x
)NB. If you can simplify the programming, the please let me know.
ThanksBo
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm