From: noam fisher on
Appears to me this error message:

Warning: Integer operands are required for colon operator when used as index

What does it mean? What should I do?

thanks
From: John D'Errico on
"noam fisher" <noam166(a)walla.com> wrote in message <hbkea7$9hs$1(a)fred.mathworks.com>...
> Appears to me this error message:
>
> Warning: Integer operands are required for colon operator when used as index
>
> What does it mean? What should I do?
>
> thanks

Which element of an array or vector is element 3.276?

John
From: Feng Shan on
On Oct 20, 9:35 pm, "noam fisher" <noam...(a)walla.com> wrote:
> Appears to me this error message:
>
> Warning: Integer operands are required for colon operator when used as index
>
> What does it mean? What should I do?
>
> thanks

I also want to kown...
From: Steven Lord on

"Feng Shan" <fengshan86(a)gmail.com> wrote in message
news:2c664323-98a6-4d25-a50d-dafbe6e0ffe6(a)j9g2000prh.googlegroups.com...
On Oct 20, 9:35 pm, "noam fisher" <noam...(a)walla.com> wrote:
> Appears to me this error message:
>
> Warning: Integer operands are required for colon operator when used as
> index
>
> What does it mean? What should I do?
>
> thanks

I also want to kown...

When you index into a variable:

x = 1:10;

with an expression involving a colon:

x(1:5)

the elements generated by that colon operator should contain only integer
values; if it doesn't, you will receive that warning. For example:

x(1.5:1:5.5)

since 1.5:1:5.5 => [1.5 2.5 3.5 4.5 5.5] and none of those are integer
values, you will receive this warning.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ