Matrix with random integer and defined rank
Show older comments
How can I create a matrix with random integer and defined rank?
1 Comment
DB
on 24 Mar 2022
Hi, have you got an answer?
Answers (1)
David Hill
on 24 Mar 2022
r=1;
while r~=2%desired rank
M=randi(100,3);
r=rank(M);
end
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!