Annotation of loncom/html/adm/help/tex/Maxima_Argument_Array.tex, revision 1.1
1.1 ! www 1: \label{Maxima_Argument_Array}
! 2: Mathresponse maintains two arrays:
! 3: \begin{itemize}
! 4: \item RESPONSE: the entries that the student provided
! 5: \item LONCAPALIST: the contents of a Perl variable or array passed in the ``Argument Array'' field
! 6: \end{itemize}
! 7: For example, to check if the student answer is the derivative of the argument list passed:
! 8: \begin{verbatim}
! 9: <script type="loncapa/perl">@vector=('x^2','x^3');</script>
! 10: <mathresponse answerdisplay="$example" cas="maxima" args="@vector" id="11">
! 11: <answer>
! 12: diffx:trigsimp(trigreduce(RESPONSE[1]-diff(LONCAPALIST[1],x,1)));
! 13: diffy:trigsimp(trigreduce(RESPONSE[2]-diff(LONCAPALIST[2],x,1)));
! 14: is (diffx=0 and diffy=0);
! 15: </answer>
! 16: <textline readonly="no" size="50" />
! 17: </mathresponse>
! 18: \end{verbatim}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>