LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Find Maxima and Minima for Each Column of a 2-D Array?

Solved!
Go to solution

Hi,

 

I have a 2-D array and I wish to find maxima and minima of each column of the 2-D array. Although I know how to get maxima and minima for the entire array but am not sure how to do it columnwise? Any ideas please?

 

Thanks,

 

Rohit

0 Kudos
Message 1 of 6
(3,144 Views)

Index the array inside a For Loop so that you find the maximum and minimum of the 1-D array.

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

Hi,

 

Hope this helps you.

Max-Min of each Column.png

0 Kudos
Message 3 of 6
(3,131 Views)

 


@GITA_A wrote:

Hi,

 

Hope this helps you.

Max-Min of each Column.png


You do know about auto-indexing, right? What happens if the array is 5 columns?

 

 

Auto-indexing a for-loop that has the Array Max and Min function is the way to do it. However, you will need to transpose the 2D array before you auto-index since LabVIEW will auto-index by rows, and you want o index out the columns.

0 Kudos
Message 4 of 6
(3,127 Views)
Solution
Accepted by topic author rohit.2691

hi,

 

@Smercurio-What you said is right, i should have shown it using Auto indexing enabled which is really great option. I just tried to show in a very simple way.Smiley Wink

 

 Anyway here is the best way

Max-Min of each Column.png

0 Kudos
Message 5 of 6
(3,121 Views)

@ GITA_A, Ravens Fan & smercurio_fc

 

Thanks for your replies. It works well now.!!

 

Rohit

0 Kudos
Message 6 of 6
(3,095 Views)