From: Matt Fig on
NO! Look at your code - it will fail, so how are you getting anything for xx and yy? Where is the END for the FOR statement? Without this, your code will not run.

The index variable i is ALWAYS positive in the loop. Therefore, x and y are ALWAYS positive. So why do you need another IF statement?
From: Nathan on
On Apr 27, 3:59 pm, "Matt Fig" <spama...(a)yahoo.com> wrote:
> NO!  Look at your code - it will fail, so how are you getting anything for xx and yy?  Where is the END for the FOR statement?  Without this, your code will not run.
>
> The index variable i is ALWAYS positive in the loop.  Therefore, x and y are ALWAYS positive.  So why do you need another IF statement?  

Note that 0 is not positive, Matt. I wonder if the OP is just wanting
mod(i,262)+1 or such.

What range of values are you looking for for x any y, Kris?

Is the range of x supposed to be 1<=x<=262 or 0<=x<=261? If neither,
what is it?
Same for y.
....
WHAT are you looking for?

-Nathan
From: Kris zenitis on
Ok i forgot end by mistake in my code is ok. The problem is that when you divide 524with 262 the x=mod(524,262)=0. I want only the positive x so i put the if statement. Nevertheless when i run the code in the xx,yy tables i had zeros.
From: Kris zenitis on
Exactly Nathan i want 1<=x<=261, 1<=y<=441.
From: Nathan on
On Apr 27, 4:31 pm, "Kris zenitis" <gio.1...(a)hotmai.com> wrote:
> Exactly Nathan i want 1<=x<=261, 1<=y<=441.

Do you want the zeros turned to ones or left out completely?

-Nathan