Problem 2064. Generate this matrix
Generate the following matrix.
n = 2;
out = [-4    -3    -2    -1     0
       -3    -2    -1     0     1
       -2    -1     0     1     2
       -1     0     1     2     3
        0     1     2     3     4];
n = 5;
out = [-10    -9    -8    -7    -6    -5    -4    -3    -2    -1     0
        -9    -8    -7    -6    -5    -4    -3    -2    -1     0     1
        -8    -7    -6    -5    -4    -3    -2    -1     0     1     2
        -7    -6    -5    -4    -3    -2    -1     0     1     2     3
        -6    -5    -4    -3    -2    -1     0     1     2     3     4
        -5    -4    -3    -2    -1     0     1     2     3     4     5
        -4    -3    -2    -1     0     1     2     3     4     5     6
        -3    -2    -1     0     1     2     3     4     5     6     7
        -2    -1     0     1     2     3     4     5     6     7     8
        -1     0     1     2     3     4     5     6     7     8     9
         0     1     2     3     4     5     6     7     8     9    10];
			Solution Stats
Problem Comments
- 
		1 Comment
		俊涛 邱
    	on 14 Feb 2021
	
	
  	不会啊
Solution Comments
Show commentsProblem Recent Solvers783
Suggested Problems
- 
         
         2517 Solvers 
- 
         
         1828 Solvers 
- 
         
         267 Solvers 
- 
         There are 10 types of people in the world 1222 Solvers 
- 
         
         2174 Solvers 
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!