The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: figure(2) doesn't work in -nodesktop mode
Replies: 1   Last Post: Mar 27, 2013 5:26 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Steven Lord

Posts: 18,038
Registered: 12/7/04
Re: figure(2) doesn't work in -nodesktop mode
Posted: Mar 27, 2013 5:26 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

<> wrote in message
> 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

> 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

Steve Lord
To contact Technical Support use the Contact Us link on

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.