tilerowcol
Get row and column indices from tile number or graphics object.
📝Syntax
[row, col] = tilerowcol(t, tilenum)
[row, col] = tilerowcol(obj)
📥Input Arguments
Parameter Description
t TiledChartLayout object.
tilenum Tile number: positive integer or array.
obj Graphics object (axes) created by nexttile.
📤Output Arguments
Parameter Description
row Row index: positive integer, or NaN for invalid or edge tiles.
col Column index: positive integer, or NaN for invalid or edge tiles.
📄Description

tilerowcol(t, tilenum) returns the row and column indices for the given tile number in the TiledChartLayout t.

tilerowcol(obj) returns the row and column of the tile occupied by the axes object obj.

Returns NaN for out-of-range tile numbers or for edge tile axes.

💡Examples
Get row and column from tile number
t = tiledlayout(2, 3);
[row, col] = tilerowcol(t, 4)
🔗See Also
tiledlayoutnexttiletilenum
🕔Version History
Version Description
1.17.0 initial version
Edit this page on GitHub