Problem 1211. Create an 'arrow-head" matrix
Write a function that when given an odd number, produces an arrow-head function pointing to the right.
Examples
n = 3
output
[1 0
0 1
1 0]
n = 5
output
[ 1 0 0
0 1 0
0 0 1
0 1 0
1 0 0]
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers135
Suggested Problems
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2350 Solvers
-
Back to basics 20 - singleton dimensions
270 Solvers
-
Given a window, how many subsets of a vector sum positive
859 Solvers
-
Matrix which contains the values of an other matrix A at the given locations.
231 Solvers
-
Deleting an element in a matrix
477 Solvers
More from this Author11
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!