you can also look at the base vectors using complex numbers
+. +/ 2.3 0j3.9 3.1
5.4 3.9
Don Kelly
On 2019-11-25 1:39 p.m., 'Bo Jacoby' via Programming wrote:
Enumerate your base vectors 1 0 and 0 1 etc.
(2.3*1 0)+(3.9*0 1)+(3.1*1 0)
5.4 3.9
Thanks.
Bo. Den mandag den 25. november 2019 19.45.04 CET skrev Raul Miller
<[email protected]>:
Or, slightly more efficient (if that matters):
V1=: |:(2 3 4;2.3),(1 2;3.9),: 2 3 4;3.1
V2=: (~.@{.,:+/&.:>/./)V1
V2-:|:(2 3 4;5.4),: 1 2;3.9
(Caution: email clients have become hostile to copy&paste, and may not
represent code accurately.)
Thanks,
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm