Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
dpb
Posts:
6,693
Registered:
6/7/07
|
|
Re: index out of bounds because numel(vgridY)=0.
Posted:
Mar 7, 2013 5:04 PM
|
|
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...
--
|
|
|
|