# subplot

Sets up a plot grid with rows by cols subwindows and sets the current axes for plotting to the location given by index.

## Syntax

subplot(rows, cols, index)

subplot(rcn)

## Inputs

rows, cols, index
Any real number.
Type: integer
Dimension: scalar
rcn
3-digit number with the first digit representing the number of rows, the second representings the number of columns, and the third representing the index.
Type: double | integer
Dimension: scalar

## Example

Simple subplot example:

clf;
subplot(1,2,1);
line([1 2 3], [1 2 3]);
subplot(1,2,2);
line([1 2 3], [3 2 1]);