# matlab loop

I am new in Matlab so I have a simple question because I am trying to implement some algorithm in java.. In the following code:

SECTIONS(:,kk) = dividefreqs(Y(ii:ii+window-1).*hanw,FS).';

What Y(ii:ii+window-1) stands for? From what I read this would be an iteration through an array Y using a loop like this:

for (int ii=0; ii<ii+window-1; ii++) but that would give me an infinite loop. Can anyboyd help me on that?
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
You are dealing with MATLAB indexing operation. ii:ii+window-1 will return a vector of sequential integers starting from ii and ending at ii+windows-1,
So, if ii=3 and window =5, you will get vector 3 4 5 6 7.
If Y is a vector (probably a sound signal), you will get vector of values from Y corresponding to the index vector. In for-loop term it will be something like
for (int i=ii; i<=ii+windows-1; i++) { printf(Y(i)); }

Experts Exchange Solution brought to you by