<firstname.lastname@example.org> wrote in message news:email@example.com... > The behavior of the "figure" command seems to work differently when using > Matlab in a shell (-nodesktop mode). I can't create new figures from the > command line. If I type > >>>figure(2) > > I get the error: > > Index Exceeds Matrix Dimensions.
That suggests that you've created a variable named figure and that variable has fewer than 2 elements, or that you've written your own figure function that's shadowing the built-in FIGURE function and somewhere in your figure function you're accessing an element beyond the element of an array. If you copied and pasted the message _exactly_ from your Command Window I suspect the latter [shadowing the FIGURE function] case more strongly, as the casing of the message you posted doesn't match the casing of the message I would expect from the former [variable] case.
To resolve the former, CLEAR the variable and modify your code so you don't create such a variable again. To resolve the latter, rename your figure function.