Problem 51122. Arrow!!
Write a script that gives (( follow the example))
if x=4 & output=
1 1 1 1
1 1 0 1
1 0 1 0
1 0 0 1
& x=5 then output=
[1 1 1 1 1
1 1 0 1 0
1 0 1 0 0
1 0 0 1 0
1 0 0 0 1]
Solution Stats
Problem Comments
-
1 Comment
Rafael S.T. Vieira
on 5 Nov 2022
What a weird-looking arrow. It would be more interesting if you asked for a Redheffer matrix.
Solution Comments
Show commentsProblem Recent Solvers27
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15655 Solvers
-
11038 Solvers
-
Omit columns averages from a matrix
598 Solvers
-
Back to basics 16 - byte order
194 Solvers
-
The Answer to Life, the Universe, and Everything
550 Solvers
More from this Author5
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!