A lot of solutions don't work with something like n=5 and m=0
Not at all...
For n-by-n matrix, m=1 if n is odd number.
ur problems are really interesting
This problem has some issues because some pairs (n,m) do not have a solution. For instance, it is impossible to find a matrix such that m = n^2 -1 since a rotation pivot does not move. Moreover, there are floor((n^2)/4) cycles of numbers, and when we match the cycle beginning with its end, it creates two matches. It is possible to do some manipulations to have an m greater than n^2 - floor((n^2)/4), but not always.
can you give an example of a matrix before and after?
My code fails for some of the cases I've mentioned. The current leading solution does better (finding some solutions my code can't), yet sometimes it enters into an infinite loop.
i had no idea this was gonna work :p
Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
Area of an Isoceles Triangle
Polite numbers. N-th polite number.
Write a function man that takes a row vector v and returns a matrix H as follows..
Put two time series onto the same time basis
Beads on a Necklace (Convex Hulls)
How Many Months Until It's Today Again?
MatCAT - Reconstruct X from Its X-rays
Find the treasures in MATLAB Central and discover how the community can help you!
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