LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compare two 2d arrays and make 3rd array by bigger numbers

Solved!
Go to solution

Dear Friends,

 

I am new in Lab view and trying to develop one of my first codes, I have 2 2d arrays which I would like to compare them and make 3rd array by bigger numbers,

 1st array: 2 5 9

                 3 5 6

2nd array: 8 9 1

                 1 3 8

final array: 8 9  9

                  3 5  6

any help or suggestion from your side would be highly appreciated.

Best regards

Arvin

 

0 Kudos
Message 1 of 6
(2,747 Views)
Solution
Accepted by RavensFan

Look at the Max and Min function in the Comparison palette.

Message 2 of 6
(2,743 Views)

Thanks for your reply

Third array should be in the same size of two array and I would like to compare them element by element, That function gives me only the max and min

0 Kudos
Message 3 of 6
(2,687 Views)
Solution
Accepted by topic author arvin1947

Did you try it?

RavensFan has the right answer.

ArrayMax.png

0 Kudos
Message 4 of 6
(2,684 Views)

@arvin1947 wrote:

Thanks for your reply

Third array should be in the same size of two array and I would like to compare them element by element, That function gives me only the max and min


You can certainly compare element by element if you put it into nested For Loops with auto-indexing turned on.

 

But that is not necessary as the function can take scalars and arrays of various dimensions as Taki showed you in his snippet.

0 Kudos
Message 5 of 6
(2,674 Views)

Thanks so much 🙂

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