2
$\begingroup$

When I try to use MuPad's linear algebra operations over a finite field, I receive the error 'An arithmetical expression is expected.' How should I go about doing this?

w := Dom::GaloisField(2, 2)(X1)
wbar := Dom::GaloisField(2, 2)(X1 + 1)
H := matrix([[0, 1, 1, 1, w, w], [0, w, 0, wbar, w, wbar], [1, 1, 1, 1, 1, 1]])
linalg::gaussJordan(H)
$\endgroup$
2
$\begingroup$

MuPad provides a separate function to create a matrix over a finite field. Use:

GF := Dom::GaloisField(2, 2);
w := GF::"variable";
wbar := w + 1;
H := Dom::Matrix(GF)([[0, 1, 1, 1, w, w], [0, w, 0, wbar, w, wbar], [1, 1, 1, 1, 1, 1]]);
linalg::gaussJordan(H);
$\endgroup$
0
$\begingroup$

I don't know anything about finite fields, but, according to the R2016a documentation for Dom::GaloisField, the combination of input arguments you're using is not supported. You also need to terminate each line with ; or : if you're running these lines in one block. Maybe try:

w := Dom::GaloisField(2, 2, X1^2+X1+1)(X1):
wbar := Dom::GaloisField(2, 2, X1^2+X1+1)(X1 + 1):
H := matrix([[0, 1, 1, 1, w, w], [0, w, 0, wbar, w, wbar], [1, 1, 1, 1, 1, 1]]);

However, you'll get another Error: An arithmetical expression is expected. [normal] when you run linalg::gaussJordan(H). I believe this is because the function does not support matrices with abstract symbolic variables (X1), which makes sense.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.