Problem 2403. Best Square-Shaped Grid for Subplot
Solution Stats
Problem Comments
-
4 Comments
Hi Omer: It sounds to me like m should always equal n if we want the result to be square-shaped. Can you explain when it's okay for m ~= n?
hello Ned. if you have 5 plots 3*2 grid subplotting will look better. similarly if x = 11, 4*3 subplot will look better shape. for some instances m=n for some not. thats the tricky part of the question :)
I imagine that you could more precisely define what the "optimum" solution you are after is by saying something along the lines of "the solution that leaves the least empty plots while keeping the difference between the number of rows and columns to 1 or less"?
Alfonso you're right. The optimum word could have been elaborated like that. I appreciate your effort.
Solution Comments
Show commentsProblem Recent Solvers34
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15530 Solvers
-
276 Solvers
-
Matrix with different incremental runs
125 Solvers
-
Find a subset that divides the vector into equal halves
387 Solvers
-
Find the index of n in magic(n)
243 Solvers
More from this Author6
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!