Create a square matrix, M, which should be populated as follows:
M = [ n^2 n * (n-1) n * (n-2) ... n * 2 n * 1;
(n-1)*n (n-1)*(n-1) (n-1)*(n-2) ... (n-1)*2 (n-1)*1;
(n-2)*n (n-2)*(n-1) (n-2)*(n-2) ... (n-2)*2 (n-2)*1;
. . . . . . ;
. . . . . . ;
. . . . . . ;
2 * n 2 * (n-1) 2 * (n-2) ... 2 * 2 2 * 1;
1 * n 1 * (n-1) 1 * (n-2) ... 1 * 2 1 * 1]
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers138
Suggested Problems
-
Find the sum of all the numbers of the input vector
53734 Solvers
-
Return the largest number that is adjacent to a zero
5511 Solvers
-
2522 Solvers
-
270 Solvers
-
110 Solvers
More from this Author37
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
6775745764
The problem description and test suite have been improved.