I never noticed something in 10+ years.

For arrays in the variable viewer pane, Matlab displays the X values on the vertical axis and the Y values on the horizontal axis.

Create a nxn array. Label it A(n1, n2).

I think of n1 as X and n2 as Y. I think of the array as being A(x, y).

But when I view that array in Matlab, the x values will be indexed vertically on the left side and the y values are indexed horizontally on the top. If I open A(n1, n2) in the variable viewer pane, n1 (what I think of as x) is the vertical dimension and n2 (y) is the horizontal dimension. n1 is across the left, and n2 the top. (Plots are different)

That could be better.

Leave a Reply