This is a little confusing to me because it was already used in the original problem, listed above, but broke when used here. My only thought as to why it would fail now is because possibly this macro depends on other macros that I didn't know to load as well, or perhaps it interferes with MathObjects or something else I loaded.
Does anyone know if this is the case, or if I might have just messed up somewhere else in the problem somehow causing these errors?
I load PGstandard, MathObjects, PGmatrixmacros, and PGmorematrixmacros.
My other thought is that perhaps the macro file we are using in the course isn't up to date and has errors in it, though that wouldn't explain why it would load in the original but not in the newer one.
I'll post the error messages below, and attach a copy of the problem file (don't criticize the rest of the problem! It's not done yet! I'll fix it up when I can get past loading the macros. :) )
The original problem's code is here on github.
Problem4 ERROR caught by Translator while processing problem file:IansRevised8/Library/Rochester/setLinearAlgebra10Bases/ur_la_10_25.pg **************** ERRORS from evaluating PG file:
Error detected while loading [PG]/macros/PGmorematrixmacros.pl: PG_macro_file_eval detected error at line 123 of file [PG]/lib/PGloadfiles.pm syntax error at line 16 of [PG]/macros/PGmorematrixmacros.pl, near "new Matrix" syntax error at [PG]/macros/PGmorematrixmacros.pl line 17, near "new Matrix" syntax error at [PG]/macros/PGmorematrixmacros.pl line 42, near "new Matrix" syntax error at [PG]/macros/PGmorematrixmacros.pl line 70, near "new Matrix" Global symbol "$B" requires explicit package name at [PG]/macros/PGmorematrixmacros.pl line 72, chunk 1. Global symbol "$B" requires explicit package name at [PG]/macros/PGmorematrixmacros.pl line 73, chunk 1. syntax error at [PG]/macros/PGmorematrixmacros.pl line 86, near "new Matrix" Global symbol "$matrix" requires explicit package name at [PG]/macros/PGmorematrixmacros.pl line 87, chunk 1. Global symbol "$B" requires explicit package name at [PG]/macros/PGmorematrixmacros.pl line 88, chunk 1. Global symbol "$row" requires explicit package name at [PG]/macros/PGmorematrixmacros.pl line 88, chunk 1. Global symbol "$scalar" requires explicit package name at [PG]/macros/PGmorematrixmacros.pl line 88, chunk 1. Global symbol "$matrix" requires explicit package name at [PG]/macros/PGmorematrixmacros.pl line 88, chunk 1. Global symbol "$row" requires explicit package name at [PG]/macros/PGmorematrixmacros.pl line 88, chunk 1. Global symbol "$B" requires explicit package name at [PG]/macros/PGmorematrixmacros.pl line 90, chunk 1. syntax error at [PG]/macros/PGmorematrixmacros.pl line 91, near "; }" [PG]/macros/PGmorematrixmacros.pl has too many errors. The calling package is PGloadfiles Died within PGloadfiles::compile_file called at line 166 of [PG]/lib/PGloadfiles.pm from within PGloadfiles::loadMacros called at line 455 of [PG]/macros/PG.pl from within main::loadMacros called at line 19 of (eval 1478)
****************
------Input Read 1 ## DESCRIPTION 2 ## Linear Algebra 3 ## ENDDESCRIPTION 4 5 ## Tagged by cmd6a 4/29/06 6 7 ## DBsubject(Linear algebra) 8 ## DBchapter(Euclidean spaces) 9 ## DBsection(Basis and dimension) 10 ## Institution('Rochester') 11 ## TitleText1('Linear Algebra with Applications') 12 ## AuthorText1('Jeffrey Holt') 13 ## EditionText1('1') 14 ## Section1('4.2') 15 ## Problem1('') 16 17 DOCUMENT(); # This should be the first executable line in the problem. 18 19 loadMacros( 20 "PGstandard.pl", 21 "MathObjects.pl", 22 "PGmatrixmacros.pl", 23 "PGmorematrixmacros.pl" 24 ); 25 26 TEXT(beginproblem()); 27 $showPartialCorrectAnswers = 1; 28 29 $a = non_zero_random(-10,10,1); 30 $b = random(-10,10,1); 31 32 BEGIN_TEXT 33 34 Find a basis of the subspace of \({\mathbb R}^2\) spanned by the solution set of the equation \( $a x_1 + $b x_2 = 0\). 35 $BR 36 \{ mbox( ans_array(2,1,5), ', ', ans_array_extension(2,1,5), '.' ) \} 37 38 END_TEXT 39 40 41 ANS(basis_cmp([[-$b/$a, 1]])); 42 43 ENDDOCUMENT(); # This should be the last executable line in the problem. -----