Note also that you can trap the domain error that %. gives you.

-- 
Raul


On Fri, Jul 11, 2014 at 9:52 AM, Roger Hui <[email protected]>
wrote:

> A matrix M is singular iff 0 = -/ .* M (determinant is 0).  Matrix algebra
> on a computer is a snakepit so sometimes you may have to a number with tiny
> magnitude, instead of 0.  One of the pleasures of rational numbers is the
> ability to use 0 here, no ifs or buts.
>
>
>
> On Fri, Jul 11, 2014 at 6:46 AM, Jon Hough <[email protected]> wrote:
>
> > Reading through the dictionary, I see that %. is only defined for
> > non-singular matrices.
> > http://www.jsoftware.com/help/dictionary/d131.htm
> >
> > If I accidentally use a singular matrix, I get a domain error. So my
> > question is, what is the best way to test for non-singularity in J?for
> 2x2
> > matrices, it is pretty simple. But for 8x8 matrices (for example) is
> there
> > a standard verb used to test for singularity?
> >
> >
> >
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to