LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

averaging specific channels


fotowat@uwindsor.ca wrote:

Thank you for the work on updating the file, however, this mean is still doesn't give me the correct average of the 18 channels for some reason


It pains me that some readers of this Forum "just don't get it".  They say "My code doesn't work", and then refuse to attach their code so we can say "Here is your error".  Even when they do attach, we explain, and they try, they still say "It still doesn't give me the correct answer for some reason", but still refuse to "show their work" so we can help them understand the reason.

 

The question posed is extremely simple, one that anyone awake in class, or willing to do a little work while viewing LabVIEW Tutorials, should be able to solve:  Given a 2D Array of sampled data from 27 channels, produce the mean of the last 18 of them.  In the spirit of providing the maximum help by getting the Original Poster to "do it him(or her)self", we "explained" the steps, and suggested that the LabVIEW "Mean" function be used.  We also begged for code to be attached.  The attached code never showed the Mean function, and (by report) the Poster still doesn't get it.

 

Here is a routine that generates 27 channels of simulated (random) data, with Channel X having data uniformly distributed between X-0.5 and X+0.5 (question for the Original Poster -- what is your best guess for the Mean of channel X?).  I then use very elementary LabVIEW + the aforementioned Mean function to produce an array of the means of Channels 9 .. 26, as requested, resulting in an Array of 18 numbers that should be near the expected means.  To make it easier to see, I also produced "Rounded Means" where (are you ready for this?) I Round the Means.  I get the expected answer.

 

I recommend the Original Poster create this VI and try it out.  It is simple enough, and spending the 5 minutes to "do it yourself" is practice you can use.  If you see something you don't understand, right-click and choose Help, or hit Reply, ask a question, and attach your code.

Specific Channel MeansSpecific Channel Means

Bob Schor

0 Kudos
Message 11 of 11
(175 Views)