01-26-2017 01:09 PM
I have 5 arrays of equal length, and I would like to take the average of each element and create a new single array of these average....ie average all 5 array element 0, average of all 5 element1, average of all 5 element 2 etc and write this to a new array.
I have tried the attached but without luck.
Solved! Go to Solution.
01-26-2017 01:15 PM - edited 01-26-2017 01:15 PM
Broken wires and the evaluation watermark makes it hard to see what is really going on.
You need a loop. Try wrapping a For Loop around the Build Array and Mean functions. Turn on auto-indexing tunnels for the 5 arrays going in and 1 array going out. A For Loop with indexing tunnels is like a "For Each Element in Array" implementation.
01-26-2017 01:24 PM
I tried that, it only created a numeric indicator on the output and not an array. Here is the code I have in place.
01-26-2017 01:30 PM
Delete the scalar indicator.
Make all 6 tunnels auto-indexing.
Right click, Create Indicator on the output tunnel from the For Loop. Now you have an array indicator.
01-26-2017 02:18 PM
Thanks for the help, that did it.....it would not create an array indicator until I deleted the wire coming from the Mean VI and re ran it to the tunnel....essentially recreating it.....then it gave me the option of creating an array indicator.
Thanks!