Whoops - sorry about that! So not quite as concise as I'd hoped:
((++@|:)-(*=@i.@#))
but that's probably already in the lists.
M
On 17/01/2013 3:06 PM, km wrote:
((++@|:)-(*=)) 2 2 $ 0 1 0 1
|length error
| ((++@|:)-(*=))2 2$0 1 0 1
= 2 2 $ 0 1 0 1
1 1
Kip
Sent from my iPad
On Jan 17, 2013, at 7:39 AM, Mike Day <mike_liz....@tiscali.co.uk> wrote:
I hadn't looked at this thread until just now.
Kip repeats his specification that the input is upper triangular with real
diagonal.
Assuming that is indeed the case, then surely this is adequate and concise:
(NB apologies for any remaining formatting problems - I've tried to correct
them manually)
((++@|:)-(*=)) A
1 2j3
2j_3 4
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm