Hi
I'm currently trying to write a matrix question. My problem is that the answer can take to forms. I can use a maple graded question to exect both answers but am having trouble when it comes to using a 'matrix; type question. It there a way to get the matrix question to accep the both answers or has it got to be done with a maple graded question.
Regards
Jim
ps below is the text file it needs to saved and then uploaded.
qu.env.validTest=
false
@
qu.1.topic=<b>Project Extra</b><br@
qu.1.1.mode=Matrix@
qu.1.1.name=<b>Application of eigenvalues and eigenvectors</b>@
qu.1.1.editing=useHTML@
qu.1.1.algorithm=$a=int(rand(2,2));
$b=int(rand(3,3));
$c=int(rand(3,3));
$d=int(rand(2,2));
$det= int(($a * $d) - ($b * $c));
condition: ne($det, 0);$M = maple("Matrix([[$a,$b],[$c,$d]])");$eigvec = maple("LinearAlgebra[Eigenvectors]($M)");$p = ("($eigvec)[2]");$Pin = maple("LinearAlgebra[MatrixInverse]($p)");$mp=maple("LinearAlgebra[Multiply]($M,$p)");$prod=maple("LinearAlgebra[Multiply]($Pin,$mp)");$e12 = maple("($prod)[1,2]");$e21= maple("($prod)[2,1]");$e22 = maple("($prod)[2,2]");$e11 =
maple("($prod)[1,1]");@
qu.1.1.size=2,2@
qu.1.1.question=
<font color="blue" size="3"><b><big>Learning Objective - To understand the
relationship between a matrix and it's inverse</big><hr color="000000" noshade="noshade" size="2" width="100%"></b><font face="lucida sans unicode" size="2" color="black">
<br>Obtain the modal matrix P and Calculate the product P<sup>-1</sup>x A x P
<br><br> where
A = <math>
<mrow>
<mo fence="true">(</mo>
<mtable>
<mtr><mtd><mn>$a</mn></mtd><mtd><mn>$b</mn></mtd></mtr>
<mtr><mtd><mn>$c</mn></mtd><mtd><mn>$d</mn></mtd></mtr>
</mtable>
<mo fence="true">)</mo>
</mrow>
</math>
</font><br><br><hr color="000000" noshade="noshade" size="2" width="80%">
@
qu.1.1.answer=
$e11, $e12,
$e21, $e22
@