Here is a downloadable PDF version: MatrixReferenceSheet.pdf
Table of Contents | ||
---|---|---|
|
Important Matrix Variables
/* global matrix ans1 u={} */
Ans1 is the built in answer matrix, submitted answers are checked against this matrix. All optional matrices must be the same dimensions as this one.
/* global matrix responsem_1 u={} */ [Optional]
responsem_1 indicates if the entry is an input field or not for ans1. Entries with a 1 will have an input field, entries with 0 will be visible to students but not able to be altered.
/* global matrix seedpre_1 u={} */ [Optional]
seedpre_1 specifies a character string to go before the entry in the answer area.
/* global matrix seedsuf_1 u={} */ [Optional]
seedsuf_1 specifies a character string to go after the entry in the answer area.
/* global matrix seedm_1 u={} */ [Optional]
seedm_1 specifies a character string to appear inside the cell
Important Code Snippets
All matrices should be converted to JSON at the end of the code block, eg.
ans1 = JSON.stringify(ans1._data);
and
seedm_1 = JSON.stringify(seedm_1._data);
etcetera.
Maxima
Maxima is available if the answer matrix contains strings, as must be with complex numbers, and evaluates them for equality.
First the maxima variable must be declared,
/* global int maxima_1 u={} */
then it should be set,
maxima_1 = 1;
Available code libraries
These Javascript libraries are accessible from the body, explanation, and prompt.
- bootstrap 4
- jquery
- datatables
- js
Javascript libraries accessible within the js_answer() function.
- js