09-28-2016 02:46 AM - edited 09-28-2016 02:54 AM
Hello,
I'm a Labview beginner and have a beginner question. I think it's for most of u very easy, so please try to help me soon:)
I have (X,Y) datavalues.. I calculated the arithmetic mean using a formula node and a for loop and got (X',Y') out. Now, I want to take the output X' and Y' and calculate a mean value in reference to X and Y. So, the same calculation in the for loop but i want to take the output values and feed it in again as input values. This should be performed N times and plotted.
I tried to use shift registers, but failed to connect it correctly that i can get what I want. I attached here this part of my vi where I have the problem. I hope that you can help me. thanks in advance.
Solved! Go to Solution.
09-28-2016 03:31 AM
Hi Sarah,
what's the reason to use formula nodes at all for such simple calculations?
You don't even need FOR loops - see attachment…
but i want to take the output values and feed it in again as input values.
Please define the next step(s): which values should be averaged in the 3rd/4th step?
Do you want to average X'' with X', then X''' with X''?
Or do you want to average X'' with X, then X''' with X?
09-28-2016 03:39 AM
thank you so much for ur reply!!
I want to average:
X with X' to get X''
X with X'' to get X'''
X with X''' to get X''''
.. and so on.
this means, I want to take this output eachtime and feed it in one of the inputs.
09-28-2016 03:47 AM
09-28-2016 04:45 AM
Hello,
thank you again. I tried it similarily before, but it doesn't work correctly, because I want to set N iterations ´for example 3 iterations, to get the average values of the whole input arrays, not only the first 5 values.
for N = 3, I have to get for example:
X''''(0), X''"(1), X''''(2),...X''''(n), where n is the size of the input array
09-28-2016 04:47 AM
Hello,
thank you again. I tried it similarily before, but it doesn't work correctly, because I want to set N iterations for example 3 iterations, to get the average values of the whole input arrays, not only the first 5 values.
for N = 3, I have to get for example:
X''''(0), X''"(1), X''''(2),...X''''(n), where n is the size of the input array
09-28-2016 04:51 AM - edited 09-28-2016 04:53 AM
Hi Sarah,
but it doesn't work correctly
What is "it" and where doesn't it work? What is the exact problem?
I want to set N iterations for example 3 iterations, to get the average values of the whole input arrays, not only the first 5 values.
My snippet generates averages for the whole array, so what's your problem?
Did you check the resulting 2D arrays?
09-28-2016 05:04 AM
09-28-2016 05:17 AM
The resulting 2D Array is fine. I want to set N iterations for taking the output X'' as an input X' and perform this for the whole array. For N=1, an array of 2529 elements. 2 for loops?
09-28-2016 05:43 AM