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
Matrix which contains the values of an other matrix A at the given locations.
Add two numbers
Find the logic
Select primes from the matrix.
Sum the rows
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