# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## How to do this nested loop inside labview

i2d=[]
img=[]
for j in range(0,129600,360):
i2d=[]
for i in range(j,360+j):
i2d.append(data[0][i])
img.append(i2d)

Message 1 of 6
(261 Views)

## Re: How to do this nested loop inside labview

You can easily put a loop inside of a loop.  You could probably do all of the appending of arrays by simply using autoindexing terminals.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 6
(256 Views)

## How to do this nested For Loop

there is a 1Darray of length 129600 and I want to create a 2D array of 360x360 out of it

I'm new to Labview and confused to do it

i2d=[]
img=[]
for j in range(0,129600,360):
i2d=[]
for i in range(j,360+j):
i2d.append(data[i])
img.append(i2d)

Message 3 of 6
(247 Views)

## Re: How to do this nested loop inside labview

I tried but was not able to do so can you provide screenshots

I'm confused how to append to array that RED BOX

means I am unable to change default array ([0]) with appended array

I'm new to this

Message 4 of 6
(250 Views)
Solution
Accepted by gptshubham595

## Re: How to do this nested For Loop

Something like this?

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
Message 5 of 6
(240 Views)

## Re: How to do this nested loop inside labview

Just wire from one tunnel to the next.  It will go from a 1D array to a 2D array.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 6
(226 Views)