LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

generate a 2d array

Is there a way to generate an unknown size of 2D array, in which the elements are generated satisfying a predefined criteria.
For eg. an array containing the following elements...\
0 0 25.6 25.6
25.6 0 51.2 25.6
51.2 0 76.8 25.6
76.8 0 102.4 25.6
102.4 0 128 25.6

The above data are the co-ordinates of the top end and bottom right points of a rectangle(row wise) and the criteria is to generate the data till the end of the rectangle namely in this case 128.and the next set of datas are generated for another row and so on...

Please help...
Veena
0 Kudos
Message 1 of 11
(3,825 Views)
How about use the enable index in while structure as the attachment?
Message 2 of 11
(3,825 Views)
Hi..
I had a look at your VI,but for each run of the VI I get a different array output.Am I missing something here? And importantly is it possible to include any condition check for the loop to execute, so that the array has the desired size and output.
Thanxs,Veena
0 Kudos
Message 3 of 11
(3,825 Views)
I have had George Lee's vi modified for your reference.
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 4 of 11
(3,825 Views)
Hi Ian,
The VI works fine for the desired number of rows.
Please do have a look at the sample data file i have attached...the row denotes the top left and bottom right co-ordinates of a grid(taken from left to right and top to bottom approach). Please help out with my data file..
Thanxs,Veena
0 Kudos
Message 5 of 11
(3,825 Views)
hi,

It seems you need a formula for that. I am more than willing to help you but I need to knock off from work now heading for home. I will try this later. Meanwhile, perhaps you can work it out first or maybe someone else able to provide u a clue before I manage to do so.

Cheers
ian.f
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 6 of 11
(3,825 Views)
How about this one?
0 Kudos
Message 7 of 11
(3,825 Views)
I guest George has got something for you.
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 8 of 11
(3,825 Views)
Hi George thanxs for the VI and thanxs to Ian too for the help.Well it was taking me time to figure it out, thanxs to you people there for the help.
Veena.
0 Kudos
Message 9 of 11
(3,825 Views)
Jus for the sake of craeting one... try this!
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
Message 10 of 11
(3,825 Views)