LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Max value across multiple pages in 3D array for all individual rows and columns

Solved!
Go to solution

Hi all,

 

I have multiple 2D array data sets stacked in a 3D array. I want to know the maximum vale for each XY position accross all data sets.

Is there a easy way to do this?

 

To better explain myself, a simple example:

 

Data set 1 (page 1 in 3D array):

1   2   3

4   5   6

7   8   9

 

Data set 2 (page 2 in 3D array)

1   4   7

2   5   8

3   6   9

 

Data set 3 (page 3 in 3D array):

1   3   6

2   5   8

4   7   9

 

Wanted result (max values for each xy position):

1   4   7

4   5   8

7   8   9

 

FYI, the actual data exists out of much more rows, columns and pages.

 

Thanks in advance!

0 Kudos
Message 1 of 6
(2,797 Views)
Solution
Accepted by topic author Brandts

Hey,

I've got a quick example using your values. It should work for larger sets of data.

 

I hope this helps.

 

Nic

--------
Nico
Systems Engineer

Certified TestStand Architect Certified LabVIEW Architect

Message 2 of 6
(2,774 Views)

Thanks, this works great.

I also learned something new because I thought "Index Array" could only be used to get a single value. 

0 Kudos
Message 3 of 6
(2,764 Views)

Great!

 

The Index Array will give you everything that matches the indexes you input. It can be used to take out a single element, a row, a column, a page... as long as you specify the indexes correctly.

 

Glad this helped!

 

Nic

--------
Nico
Systems Engineer

Certified TestStand Architect Certified LabVIEW Architect

0 Kudos
Message 4 of 6
(2,761 Views)
Solution
Accepted by topic author Brandts

Here is a simpler version of Nico011's solution (using autoindexing for the output).


GCentral
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 5 of 6
(2,757 Views)

This one looks indeed a lot easier!

Thank you for your improvement.

0 Kudos
Message 6 of 6
(2,732 Views)