From: AP on
Yes, I checked it by setting values for the variables within the program (i.e. N =5, K= 4, etc.) to see if it was a probalem involving my textboxes on the GUI. But I get the same error.

Walter Roberson <roberson(a)hushmail.com> wrote in message <i3a3ap$ibs$1(a)canopus.cc.umanitoba.ca>...
> AP wrote:
> > "Sean " <sean.dewolski(a)nospamplease.umit.maine.edu> wrote in message
> > <i39s4s$2f6$1(a)fred.mathworks.com>...
> >> "AP " <apb1508138(a)gmail.com> wrote in message
> >> <i39rpm$9gq$1(a)fred.mathworks.com>...
> >> > I've started working with the GUI in Matlab, and at several places
> >> in my code, I use a a 'blank' column vector with the zeros function >
> >> > e.g. Val = zeros(2*N+1,1)
> >> > > and this goes on producing errors, either at this point or later.
> >> > > How should I enter this in a GUI? It works fine as an ordinary
> >> function. > > Thanks.
> >> What are the errors?
> >
> > Initially ---
> >
> > "Warning: Size vector should be a row vector with integer elements. "
> >
> > and
> > "??? Attempted to access OptVal(1.4); index must be a positive integer
> > or logical."
>
> Are you sure that N is an integer?
From: Jan Simon on
Dear AP,

> > Are you sure that N is an integer?

> Yes, I checked it by setting values for the variables within the program (i.e. N =5, K= 4, etc.) to see if it was a probalem involving my textboxes on the GUI. But I get the same error.

No. N is not integer in your program, as Walter said already. Anywhere in the code N is overwritten by a floating point value. Perhaps by "N = ...", "eval('N = ..." or by "load MatFile", if the MatFile contains the variable N. Anyhow, N is not integer anymore.
Please use the debugger to stop the program, when the problem occurs:
dbstop if error
Then display the value of N in the command window.

Good luck, Jan