07-24-2020 04:38 AM
Hi,
I am looking for a Way to calculate each value of an array with a function and then output the new array. My problem is, that the function refers to the values of the array. So far it only calculates the first value of the array and puts it in a column of the calculated array. The formula is the following: E(New) = C0 + C1*E + C2*E^2 + C3*E^3 + C4*E^4. (Array is filled with varying E)
I read how you can multiply the array with a constant, but could not find a similar problem to my case. I am sure I am overseeing something but can't figure it out.
Any help appreciated. The VI is attached
Solved! Go to Solution.
07-24-2020 06:22 AM - edited 07-24-2020 06:28 AM
07-24-2020 09:43 AM
Because I did not know of it. Thank you, works great.
I seperated the signal so I can do the calculation on my array. Does the vi you presented also accept the signal as input?
07-24-2020 12:50 PM
Hi Phil,
@Phil7 wrote:
I seperated the signal so I can do the calculation on my array.
No need to separate a single signal from a DDT wire containing only this single signal…
@Phil7 wrote:
Does the vi you presented also accept the signal as input?
The FOR loop accepts the signal as is shown in the snippet.
I guess I don't understand this question…
07-24-2020 01:16 PM
@GerdW wrote:
I guess I don't understand this question…
@Phil7, I think what GerdW was trying to say was that the Split Signal "Splits two or more signals into component signals."
(@GerdW, please correct me if I'm wrong. 😊)
So, if you only have one input signal, it doesn't make sense to Split it - just feed it directly into the "Convert From Dynamic Data" (or "Von dynamischen Daten konvertieren", in your case). Like this:
If you need to combine the two signals in your output, you can just branch the wire and then feed it into a "Merge Signals" like you have already done:
Does that make sense?
-joeorbob