I have a problem with the context declared as
Context("Vector")
, and variables set to be Context("Vector")->variables->are(s=>'Real',t=>'Real')
.The correct answer is defined as
$rparam = Vector( "$ppos + $dv1*s + $dv2*t" );
, where $ppos
, $dv1
, and $dv2
are (constant) vectors.In the problem answer evaluation, I have a custom checker that starts
checker=>sub {
my ( $c, $s, $ans ) = @_;
my @stucoord = $s->value;
Then, if an answer is entered with angle brackets, the result is as I expect: @stucoord is an array of three Value::Formula objects. However, if the answer is entered in ijk format (as
a i + b j + c k
), $s and $stucoord[0] are Value::Formula objects, but $stucoord[1] and $stucoord[2] are empty.Obviously, I'm demonstrating an inability to understand MathObjects again. If someone could explain what I'm doing wrong that would be great.
Thanks,
Gavin