Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to transpose matrix A.
MATLAB
B = A[1]; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using dot (.) instead of transpose operator
Using multiplication (*) or power (^) operators
✗ Incorrect
In MATLAB, the transpose of a matrix is obtained by adding a single quote (') after the matrix variable.
2fill in blank
mediumComplete the code to transpose matrix M and store it in T.
MATLAB
T = [1]';
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Adding transpose operator twice
Using incorrect function names
✗ Incorrect
You need to write the matrix variable M before the transpose operator '.
3fill in blank
hardFix the error in the code to correctly transpose matrix X.
MATLAB
Y = [1]; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using dot (.) or multiplication (*) instead of transpose
Using power (^) operator
✗ Incorrect
The correct way to transpose a matrix in MATLAB is to use the single quote (') operator after the matrix variable.
4fill in blank
hardFill both blanks to create a matrix where each element is the transpose of the original matrix A.
MATLAB
B = [1]'; C = [2]';
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect variable names
Forgetting the transpose operator
✗ Incorrect
To transpose matrix A, use A' and to transpose matrix B, use B'.
5fill in blank
hardFill all three blanks to create a transposed matrix and multiply it by another matrix.
MATLAB
T = [1]'; R = [2] * [3];
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Multiplying matrices in wrong order
Forgetting to transpose the matrix
✗ Incorrect
Transpose matrix M to get T, then multiply T by matrix N to get R.