You are viewing this question as it will appear in the manual grading interface.
Return to the normal view when
you are done.
Correct answer
1 2 3 4 5 | a = 8.00; d = 5.03; x = [8.00, 12.00, 8.00]; x1 = [8.00 12.00; 8.00 12.00]; x2 = [8.00 12.00 8.00; 8.00 12.00 8.00; 8.00 12.00 8.00]; |
1 2 3 4 5 | a = 8.00; d = 5.03; x = { 8, 12, 8}; x1 = {{ 8, 12}, { 8, 12}}; x2 = {{ 8, 12, 8}, { 8, 12, 8}, { 8, 12, 8}}; |
1 2 3 4 5 6 7 | import numpy as np a = 8.00 d = 5.03 x = np.array([ 8, 12, 8]) x1 = np.array([[ 8, 12], [ 8, 12]]) x2 = np.array([[ 8, 12, 8], [ 8, 12, 8], [ 8, 12, 8]]) |
1 2 3 4 5 | a = 8.00 d = 5.03 x = c( 8, 12, 8) x1 = matrix(c( 8, 12, 8, 12), nrow = 2, ncol = 2, byrow = TRUE) x2 = matrix(c( 8, 12, 8, 8, 12, 8, 8, 12, 8), nrow = 3, ncol = 3, byrow = TRUE) |
1 2 3 4 5 6 7 | from sympy import * a = 8.00 d = 5.03 x = Matrix([ 8, 12, 8]) x1 = Matrix([[ 8, 12], [ 8, 12]]) x2 = Matrix([[ 8, 12, 8], [ 8, 12, 8], [ 8, 12, 8]]) |
1 2 | x = [8, 12, 8]; % This is an array x1 = [8 12; 8 12]; % This is a 2D matrix |
1 2 | x = { 8, 12, 8}; (* This is an array *) x1 = {{ 8, 12}, { 8, 12}}; (* This is a 2D matrix *) |
1 2 3 4 | import numpy as np x = np.array([ 8, 12, 8]) # This is an array x1 = np.array([[ 8, 12], [ 8, 12]]) # This is a 2D matrix |
1 2 | x = c( 8, 12, 8) # This is an array x1 = matrix(c( 8, 12, 8, 12), nrow = 2, ncol = 2, byrow = TRUE) # This is a 2D matrix |
1 2 3 4 | from sympy import * x = Matrix([ 8, 12, 8]) # This is an array x1 = Matrix([[ 8, 12], [ 8, 12]]) # This is a 2D matrix |
1 2 3 4 5 | a = 8; b = 12; d = 5.03103732; c = 0.36; xC = [0.36, 8.00, 0.36]; |
1 2 3 4 5 | a = 8; b = 12; d = 5.03103732; c = 0.36; xC = {0.36, 8.00, 0.36}; |
1 2 3 4 5 6 7 | import numpy as np a = 8 b = 12 d = 5.03103732 c = 0.36 xC = np.array([0.36, 8.00, 0.36]) |
1 2 3 4 5 | a = 8 b = 12 d = 5.03103732 c = 0.36 xC = c(0.36, 8.00, 0.36) |
1 2 3 4 5 6 7 | from sympy import * a = 8 b = 12 d = 5.03103732 c = 0.36 xC = Matrix([0.36, 8.00, 0.36]) |
1 2 3 4 5 6 7 | C = [8, 12, 8]; % The Mathematica tab adds an 'm' to the variable name D = [8 12; 8 12]; E = 12; I = 8; K = 12; N = 8; O = 12; |
1 2 3 4 5 6 7 | Cm = { 8, 12, 8}; (* The Mathematica tab adds an 'm' to the variable name *) Dm = {{ 8, 12}, { 8, 12}}; Em = 12; Im = 8; Km = 12; Nm = 8; Om = 12; |
1 2 3 4 5 6 7 8 9 | import numpy as np C = np.array([ 8, 12, 8]) # The Mathematica tab adds an 'm' to the variable name D = np.array([[ 8, 12], [ 8, 12]]) E = 12 I = 8 K = 12 N = 8 O = 12 |
1 2 3 4 5 6 7 | C = c( 8, 12, 8) # The Mathematica tab adds an 'm' to the variable name D = matrix(c( 8, 12, 8, 12), nrow = 2, ncol = 2, byrow = TRUE) E = 12 I = 8 K = 12 N = 8 O = 12 |
1 2 3 4 5 6 7 8 9 | from sympy import * C = Matrix([ 8, 12, 8]) # The Mathematica tab adds an 'm' to the variable name D = Matrix([[ 8, 12], [ 8, 12]]) E = 12 I = 8 K = 12 N = 8 O = 12 |
1 | x1 = [8 12; 8 12]; |
1 | x1 = {{ 8, 12}, { 8, 12}}; |
1 2 3 | import numpy as np x1 = np.array([[ 8, 12], [ 8, 12]]) |
1 | x1 = matrix(c( 8, 12, 8, 12), nrow = 2, ncol = 2, byrow = TRUE) |
1 2 3 | from sympy import * x1 = Matrix([[ 8, 12], [ 8, 12]]) |
All computational languages are displayed by default. These can be turned off using the
element attributes show-matlab, show-mathematica,
show-numpy, and show-r. In this example, we remove the the Matlab
tab. The default active tab will be the first one in the list, in this case: Mathematica.
1 | x1 = {{ 8, 12}, { 8, 12}}; |
1 2 3 | import numpy as np x1 = np.array([[ 8, 12], [ 8, 12]]) |
1 | x1 = matrix(c( 8, 12, 8, 12), nrow = 2, ncol = 2, byrow = TRUE) |
1 2 3 | from sympy import * x1 = Matrix([[ 8, 12], [ 8, 12]]) |
When a tab is not displayed, the default active tab can still be set. In this case, the Mathematica tab is hidden and NumPy is set as the default active tab.
1 | d = 5.03103732; |
1 2 3 | import numpy as np d = 5.03103732 |
1 | d = 5.03103732 |
1 2 3 | from sympy import * d = 5.03103732 |
Any tab can be displayed alone. In this case, the Matlab, Mathematica, and R tabs are hidden and the NumPy tab is displayed alone.
1 2 3 | import numpy as np x1 = np.array([[ 8, 12], [ 8, 12]]) |
1 2 3 | from sympy import * x1 = Matrix([[ 8, 12], [ 8, 12]]) |
Student view placeholder
In student views this area is used for assessment and score info.
Tools
Staff information
Question
Title:
Element pl-variable-output: Display matrix and scalar data
Variant
Started at:
2026-08-04 23:45:38 (CDT)
Duration:
0s
Show/Hide answer
{}