help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: invertable matrix - result as integer matrix


From: Thomas Weber
Subject: Re: invertable matrix - result as integer matrix
Date: Sun, 17 Jan 2010 10:23:24 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Sun, Jan 17, 2010 at 06:50:36AM +0100, Jaroslav Hajek wrote:
> On Sun, Jan 17, 2010 at 1:47 AM, orzech <address@hidden> wrote:
> >
> > Hi,
> > I would like to get an invertible matrix in Octave but as integers matrix,
> > so:
> >
> > x = [9,15;19,2];
> > inv(x)
> >
> > and the result is:
> >
> > [-0.0074906, 0.0561798; 0.0711610, -0.0337079]
> >
> > but I would like to get [22,17;25,21] anyone knows how to convert this
> > result? Many thanks.
> >
> 
> I don't understand:
> octave:7> [22,17;25,21] * [9,15;19,2]
> ans =
> 
>    521   364
>    624   417
> 
> this is clearly not remotely close to an inverse or its multiple.

I think orzech is calculating in the 26 residue class[1], i.e. Z/mZ with m=26.

mod(521,26) = 1;
mod(417,26) = 1;

mod(364,26) = 0;
mod(624,26) = 0;

[1] http://en.wikipedia.org/wiki/Modular_arithmetic

        Thomas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]