On Tue, 25 Jan 2022, Igor Zhuravlov wrote:
Just a remark: the sentence %"_1 _ +/&.:*: finds column norms, then normalizes rows. To normalize columns the rank- specifying part should be removed: % +/&.:*:
That is incorrect. Example: ]x=. ?3 6$0 NB.six 3-d vectors 0.622471 0.324707 0.907825 0.0631566 0.38662 0.338598 0.095767 0.601479 0.285658 0.926716 0.299674 0.417604 0.687686 0.837773 0.792088 0.465073 0.605581 0.190086 (%"_1 _ +/&.:*:) x NB.normalize all 0.667531 0.30031 0.733179 0.0607982 0.496644 0.59378 0.102699 0.556287 0.230703 0.892111 0.384955 0.73233 0.737466 0.774828 0.639707 0.447706 0.777917 0.333344 (% +/&.:*:) 0.622471 0.095767 0.687686 NB.manually check first column 0.66753 0.102699 0.737466 (% +/&.:*:) x NB.try without rank |length error | (%+/&.:*:)x -E ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
