Thanks for the feedback. Not quite sure what ^: does either. It should have been *: The function is a correlation. Same as the excel function CORR. I thought it'd be useful to use J as a test harness. I know work will be anti J for the implementation.
here is ver 2. Could it be prettier? m=:(+/ % #) corr=:(+/@:([...@-@(m...@[))@*@(]...@-@(m...@]))) @%:@((+/@:(*:@[...@-@(m@ [)))@*@(+/@:(*:@(]...@-@(m...@]))))) 1 2 3 corr 4 5 6 NB. e.g. Steven ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
