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: 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  

Posts: 9,850
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]

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