LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

looking for a better way to add many arrays

Solved!
Go to solution

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?

0 Kudos
Message 1 of 3
(2,628 Views)
Solution
Accepted by topic author dragondriver

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.

0 Kudos
Message 2 of 3
(2,626 Views)

@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 🙂

0 Kudos
Message 3 of 3
(2,615 Views)