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: index out of bounds because numel(vgridY)=0.
Replies: 1   Last Post: Mar 7, 2013 5:04 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
dpb

Posts: 8,296
Registered: 6/7/07
Re: index out of bounds because numel(vgridY)=0.
Posted: Mar 7, 2013 5:04 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 3/7/2013 3:19 PM, xiaojun Song wrote:
> I have written the following function. But I have problems accessing the
> index of one variable which I defined before. It reports "Attempted to
> access vgridY(1); index out of bounds because numel(vgridY)=0." I
> already defined vgridY=(boundsY(1):iY:boundsY(2))' but I still couldn't
> access the index of vgridY....


Almost certainly the input from boundsY isn't what you think so that the
computed iY is <=0 or boundsY(1)>boundsY(2) or somesuch problem so that
the result is that vgridY is empty.

Set a breakpoint on the line where it's defined and look at the
components thereof and the problem will undoubtedly become clear...

--



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.