The rank of a matrix (in the linear algebra, not J sense) is tricky to 
determine numerically because of stability issues: an arbitrarily small 
perturbation may increase the rank.  A good practical start is the singular 
value decomposition, available through the LAPACK extension.  This reduces the 
problem to finding the rank of a diagonal matrix.

Best wishes,

John

> On Jan 13, 2022, at 2:53 PM, Pawel Jakubas <[email protected]> wrote:
> 
> Dear J enthusiasts,
> 
> I am wondering what is the preferable way to determine the rank of a matrix
> in J.
> I would expect here below
> 
>   ]m=: 3 3 $ 1 2 3 5 4 6 9 7 8
> 1 2 3
> 5 4 6
> 9 7 8
>  rank m
> 3
> 
>   ]m=: 3 3 $ 1 2 3 2 4 6 9 7 8
> 1 2 3
> 2 4 6
> 9 7 8
>  rank m
> 2
> 
> Thanks and cheers
> Pawel Jakubas
> ----------------------------------------------------------------------
> For information about J forums see 
> https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&amp;data=04%7C01%7Crandall%40newark.rutgers.edu%7C880d6cd5d64e4e90976208d9d6ce1893%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C637777003825756175%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=pwibQz9Jk2T4mmkbJ%2FTVp6YgUGhZRVCZx8KUTVEppIc%3D&amp;reserved=0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to