It looks to me as if the two left hooks form one big left hook,
not that I'm into boxing:

   mn =: -"1 mean
   mp1=: mp~|:

   ((mp1 mn)%#)data    NB. big "hook"
504 360 180
360 360   0
180   0 720

   ((mp1 @: mn)%#)data   NB. mp1 after mn using @:
504 360 180
360 360   0
180   0 720

   (([: mp1 mn)%#)data    NB. mp1 after mn using [:
504 360 180
360 360   0
180   0 720

Any use?

Mike


On 12/02/2017 08:06, Lippu Esa wrote:
]data=. 5 3 $ 90 60 90 90 90 30 60 60 60 60 60 90 30 30 30

mean=: +/%#
mp=:  +/ . *
covmat=: ((mp~|:)(-"1 mean))%# NB. divede by n not n-1 to comply with the 
example


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to