n>=3, generate a matrix of nth such that n^2 is the max number, and max number must be in [1,1] or [end, end]. One example will be suggested below:
Example : n=4
10 9 8 7
11 2 1 6
12 3 4 5
13 14 15 16
Replace May with April
Duplicate each element of a vector.
What is Sum Of all elements of Matrix
Find Out sum of principal diagonal element of given matrix
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office