Creating a 6x8 matrix with rank 2 In general, rank(AB) <= min(rank(A), rank(B)). If A and B are random matrices, the relation should be an equality.
Try to create a 6x8 matrix with rank 2 by modifying the above procedure. (hint: mx2 times 2xn is mxn). Verify the matrix is rank 2 with the rank command
MATLAB Code:
close all
clear
clc
A = randi(10, 6, 2); % 6x2 matrix with entries as integers
between 1 and 10
B = randi(10, 2, 8); % 2x8 matrix with entries as integers between
1 and 10
M = A*B;
disp('Rank 2 Matrix, M ='), disp(M)
disp('Rank of above Matrix ='), disp(rank(M))
Output:
Get Answers For Free
Most questions answered within 1 hours.