getRowsCols(N,longDim)
Version 1.0.0.0 (1018 Bytes) by
Shannon Locke
Calculates the number of rows and columns for square figure with subplots
This function number of rows and columns for subplots where you want the final figure to be as square as possible. If one dimension is going to be longer than the other, you can specify if you want this to be the rows or columns with the 'longDim' argument (default is columns).
E.g.
[R,C] = getRowsCols(5) gives R=2, C=3.
[R,C] = getRowsCols(9) gives R=3, C=3.
Cite As
Shannon Locke (2025). getRowsCols(N,longDim) (https://se.mathworks.com/matlabcentral/fileexchange/58605-getrowscols-n-longdim), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2014a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Subplots in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
