README (not visible to students)
This question provides two matrices as both NumPy and MATLAB variables using the <pl-variable-output> element. The entries of the matrices are randomly generated. Students are asked to compute the product of these two matrices, and provide their answer using either NumPy or MATLAB format. The generated matrices are converted to JSON format with pl.to_json(...) for storage in data["params"] and data["correct_answers"].
Correct answer
Student view placeholder
In student views this area is used for assessment and score info.
Tools
Staff information
Question
Title:
Matrix input: random parameters and correct answer
Variant
Started at:
2026-08-04 23:53:49 (CDT)
Duration:
0s
Show/Hide answer
{
"C": {
"_type": "ndarray",
"_dtype": "float64",
"_value": [
[
-1.06,
-0.4500000000000001,
0.19999999999999998,
-0.82
],
[
0.67,
-0.8200000000000001,
0.07999999999999997,
-1.51
],
[
0.1399999999999999,
1.02,
0.04000000000000001,
0.42
],
[
0.39,
-0.8,
0.17,
-0.48000000000000004
]
]
}
}