Given n, generate the following matrix:
a = [ n n-1 n-2 ... 2 1;
n-1 n-1 n-2 ... 2 1;
n-2 n-2 n-2 ... 2 1;
. . . . . .;
. . . . . .;
. . . . . .;
2 2 2 ... 2 1;
1 1 1 ... 1 1]
Good luck!
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers125
Suggested Problems
-
Determine whether a vector is monotonically increasing
23705 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
2084 Solvers
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1336 Solvers
-
Sum of diagonal of a square matrix
1646 Solvers
-
Find out sum of all elements of given Matrix
541 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
this problem is similar with Problem 1630. ~~~~~~~ WAVE ~~~~~~~~~
Apologies! Didn't see this problem until just recently.