# LabVIEW

cancel
Showing results for
Search instead for
Did you mean:

Solved!
Go to solution

## Extracting some part of 1-D array from 2-D array

Hello. I am using Labview 2014 and need your help.

My purpose is to calculate average of some part in test data file. I did it very easily with Excel using such function of ‘=AVERAGE(D3:D5)’. To manipulate many test data files, I am trying to automate the process with Labview.

Would you please see my attachment image file and answer the questions?

1. Using the For Loop and the Case Structure, I can extract some part of 1-D array from 2-D array, which I want (Column 4; Row 3 to Row 5). However, there is still unwanted elements of two zeros (Column 4; Row 1 and Row 2) and affect the average calculation. How can I eliminate the unwanted zero returns so that only wanted part (Column 4; Row 3 to Row 5) can be averaged?
2. Do you know much simpler method other than my code, which can achieve my purpose?

Message 1 of 5
(2,871 Views)
Solution
Accepted by converser26

## Re : Extracting some part of 1-D array from 2-D array

Hi Conserver,

Yes there is a simplier way to do it. And it solves both your problems :

Then you just need to calculate the average of all the values in the output table 😉

Hope it helps !

Maxime -- Kudos are a great way to say thank you
Message 2 of 5
(2,843 Views)
Solution
Accepted by converser26

## Re : Extracting some part of 1-D array from 2-D array

Hi,

Or maybe something like this:

Message 3 of 5
(2,835 Views)
Solution
Accepted by converser26

## Re : Extracting some part of 1-D array from 2-D array

Check it will be esay.......to extract

Message 4 of 5
(2,800 Views)

## Re: Extracting some part of 1-D array from 2-D array

Thank you.

I am going to take all of your comments into my program.

Message 5 of 5
(2,728 Views)