Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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: 17,944
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



<kevin.neilson@xilinx.com> wrote in message
news:6dab17a4-128d-4bb0-b7c2-619dc5b4123e@googlegroups.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.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.