Thanks, as ever. I am off to read up in the dictionary just what that boxed lh argument is doing. Anywhere else I should be looking besides the J dictionary?
On 6 January 2012 20:49, Roger Hui <rogerhui.can...@gmail.com> wrote: > (<0 1)|:m > > > > On Fri, Jan 6, 2012 at 12:47 PM, Alex Giannakopoulos < > aeg...@blueyonder.co.uk> wrote: > > > Hi > > > > Is there a better (more efficient or whatever) way of getting the > diagonal > > of a matrix than the simple multiplication I use below? > > > > Say, > > > > randmat=. [: ? 0 $~,~ > > idmat =. [:=i. > > randiag =. randmat * idmat > > > > Many Thanks > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm