How to create a m*n matrix with 0,1 entries?
Show older comments
In this matrix All entries are zeros except for a single 1 in each row and at most a single 1 in each column?
2 Comments
John D'Errico
on 14 Feb 2017
Trivial.
eye(m,n)
That fits your requirements.
Do you have some more information on what you really need?
sn at
on 14 Feb 2017
Accepted Answer
More Answers (1)
the cyclist
on 14 Feb 2017
One way to do this
eye(m,n)
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!