06-14-2013 04:55 AM
Hi there,
I am new to G lanuage and I find it pretty hard to understand the way to deal with array in labview. I am trying to create the sum of more than 15 (discrete) consine functions each with different frequencies. I am using the loop and consine function to generate the array for each cosine but to add all of them (element-by-element addition), must I use a loop again? I really curious if there is any other way to generate the sum of all those cosine at a time and convert the result into a single array. Someone suggests to use formular and for loop, but I don't understand that, how to use formular and how to make the outcome array?
Solved! Go to Solution.
06-14-2013 05:00 AM - edited 06-14-2013 05:06 AM
You can create and add in the same iteration using a shift register.
Here's a quick demo adding five sine functions with different numbers of cycles. You should be able to adapt it to your problem.
06-14-2013 05:11 AM
@altenbach wrote:
You can create and add in the same iteration using a shift register.
Here's a quick demo adding five sine functions with different numbers of cycles. You should be able to adapt it to your problem.
Thanks a lot 🙂