Thanks Arie Groeneveld! Your solution is impressive and not embarassing. I will spend some time deciphering it. Bo.
Den 10:46 tirsdag den 16. september 2014 skrev Aai <[email protected]>: > > >I'm not sure if this is less embarrassing, but here's an power iterator >solution: > >0{::([ ((,{.);]) {:@[ f"1 }.@])&>/^:(<:@#`(,:@{.;])) !/~i.10 > > > >On 16-09-14 08:56, 'Bo Jacoby' via Programming wrote: >> I managed to ortogonalize a 10 10 - matrix like this: >> >> f=.[:(%+./)(]*[:+/[*[)-[*[:+/* >> orto =. 3 : 0 >> a=.,:{.y >> a=.a,{.y=.({:a)f"1}.y >> a=.a,{.y=.({:a)f"1}.y >> a=.a,{.y=.({:a)f"1}.y >> a=.a,{.y=.({:a)f"1}.y >> a=.a,{.y=.({:a)f"1}.y >> a=.a,{.y=.({:a)f"1}.y >> a=.a,{.y=.({:a)f"1}.y >> a=.a,{.y=.({:a)f"1}.y >> a=.a,{.y=.({:a)f"1}.y >> ) >> orto(!/~)i.10 >> 1 1 1 1 1 1 1 1 1 1 >> _9 _7 _5 _3 _1 1 3 5 7 9 >> 6 2 _1 _3 _4 _4 _3 _1 2 6 >> _42 14 35 31 12 _12 _31 _35 _14 42 >> 18 _22 _17 3 18 18 3 _17 _22 18 >> _6 14 _1 _11 _6 6 11 1 _14 6 >> 3 _11 10 6 _8 _8 6 10 _11 3 >> _9 47 _86 42 56 _56 _42 86 _47 9 >> 1 _7 20 _28 14 14 _28 20 _7 1 >> _1 9 _36 84 _126 126 _84 36 _9 1 >> >> >> How can the program orto be made less embarrassing? >> >> Thank you! >> >> >> Bo. >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > >-- >Met vriendelijke groet, >@@i = Arie Groeneveld > >---------------------------------------------------------------------- >For information about J forums see http://www.jsoftware.com/forums.htm > > > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
