Simple question: modulo



"mod" is the modulo function.  If you want to apply mod 26 to a matrix m,
use matrixmap:

matrixmap(lambda([x],mod(x,26)),m);

If you don't like the lambda construction you can always create a little
function first:

mod26(x):=mod(x,26);
matrixmap(mod26,m);

Hope this helps,
Alasdair

On Jan 27, 2008 10:10 PM, Hanno Behrens <pebbles at schattenlauf.de> wrote:

> Sorry for such a simple question, but I really can't find the modulo
> function
> in maxima. Scanned all documentation but I must be blind or something.
>
> For integers like in C 5%4 -> 1
>
> m: matrix( [15,2,7],  [8,10,23],  [0,2,8]);
>
> [12,0,8]*m;
>
> Should give the values modulo 26.
>
> Can someone help? Really basic problem...
>
> Hanno
> --
> Hanno Behrens - Hamburg http://pebbles.schattenlauf.de/
> Ceterum censeo microsoft esse delendam
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>