On Mon, 24 Jan 2022, 14:30:48 +10 Elijah Stone wrote:
> What if I've got an array of vectors, and I want to normalise all of them?
> There are two ways, corresponding to two different representations:
> %+/&.:*:"1 and %"_1 _ +/&.:*:.  The former corresponds to an array where
> the last axis is the axis axis, and the latter to an array where the
> leading axis is the axis axis (which may seem odd, but I've found it
> useful).

Just a remark: the sentence
  %"_1 _ +/&.:*:
finds column norms, then normalizes rows. To normalize columns the rank-
specifying part should be removed:
  % +/&.:*:

-- 
Regards
Igor



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to