Skip to main content
4-Participant
July 2, 2023
Solved

Column array with different assignment in even and odd rows

  • July 2, 2023
  • 2 replies
  • 2100 views

Hello community


I request your help please with the following problem:

I need to run a for or similar loop that allows me to build a 1x (2N) array, where N is an input value.

That is, the array will always have an even number of rows. On each odd row the routine should place "Px" and on each even row the routine should place "Py".

 

QS_10727930_0-1688270396426.png

 

 

Thanking you in advance for your help

 

 

Best answer by LucMeekes

I made a mistake. You've set ORIGIN t0 1. My program needs a tweak.

 

Success!
Luc

 

2 replies

23-Emerald IV
July 2, 2023

How about:

LucMeekes_0-1688279737889.png

Success!

Luc

4-Participant
July 2, 2023

It seems that the results are not obtained in the positions that it should. For example, 45 would have to be in row 5 and -20 in row 6 and the array should have only 2*N=2*12=24 rows

LucMeekes23-Emerald IVAnswer
23-Emerald IV
July 2, 2023

I made a mistake. You've set ORIGIN t0 1. My program needs a tweak.

 

Success!
Luc

 

4-Participant
July 2, 2023

I have tried this, pero it doesnt work....

QS_10727930_0-1688320318011.png

 

24-Ruby III
July 3, 2023

@QS_10727930 wrote:

I have tried this, pero it doesnt work....

QS_10727930_0-1688320318011.png

 


Hi,

MartinHanak_0-1688366529578.png