0
0
MATLABdata~10 mins

Matrix rank and null space in MATLAB - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to calculate the rank of matrix A.

MATLAB
r = [1](A);
Drag options to blanks, or click blank then click option'
Arank
Bnull
Csize
Ddet
Attempts:
3 left
💡 Hint
Common Mistakes
Using null instead of rank.
Using size which returns matrix dimensions, not rank.
2fill in blank
medium

Complete the code to find the null space of matrix B.

MATLAB
N = [1](B);
Drag options to blanks, or click blank then click option'
Adet
Brank
Cinv
Dnull
Attempts:
3 left
💡 Hint
Common Mistakes
Using rank instead of null.
Using inv which requires a square invertible matrix.
3fill in blank
hard

Fix the error in the code to compute the rank of matrix C.

MATLAB
r = rank[1]C[2];
Drag options to blanks, or click blank then click option'
A(
B)
C[
Attempts:
3 left
💡 Hint
Common Mistakes
Using square brackets or curly braces instead of parentheses.
Omitting parentheses entirely.
4fill in blank
hard

Fill both blanks to create a dictionary (struct) of ranks for matrices M and N.

MATLAB
ranks.M = [1](M);
ranks.N = [2](N);
Drag options to blanks, or click blank then click option'
Arank
Bnull
Csize
Ddet
Attempts:
3 left
💡 Hint
Common Mistakes
Using null for one or both blanks.
Using size or det which do not return rank.
5fill in blank
hard

Fill all three blanks to compute rank, null space, and size of matrix P.

MATLAB
r = [1](P);
n = [2](P);
s = [3](P);
Drag options to blanks, or click blank then click option'
Arank
Bnull
Csize
Ddet
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up rank and null.
Using det instead of size.