From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array stuff

Solved!
Go to solution

Hi,

 

I am building a derivation from an array, i came up with the example VI attached, i don't know if this is to intensive for my computer, i am going to have an array of 107 x 51 every 50 ms and want to derive channels from them when giving values between -1 an 1, it could be that i have 4 times a channel x 0.25 and one channel -1...

 

Anyone knows a better solution?

Regards,

Thijs

0 Kudos
Message 1 of 6
(2,517 Views)

I am not entirely sure what you want to do but your solution does look long-winded.

Here is a link which MAY point you in the right direction http://forums.ni.com/t5/LabVIEW/Dr-Damien-s-Development-Memory-Allocation-in-Loops/m-p/1075712#M4765...

I found it very useful.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 2 of 6
(2,506 Views)

I believe the operation you want is Convolution, or possibly Correlation. There are several variants of these functions, and which ones you have available may depend on which version of LabVIEW you are using. Try searching the palettes for Convolution and see if you can find the right function for your application.

0 Kudos
Message 3 of 6
(2,491 Views)

Hi,

 

Maybe i can explain it better...

I have lets say 6 signals i call these 'raw signals' now i want to make a
setting with 6 raw signals and 3 derivatives of these 6 raw signals:

New sig1 = raw_sig1 x 1 + raw_sig2 x 0 + raw_sig3 x 0 + raw_sig4 x 0 + raw_sig5 x 0 + raw_sig6 x 0

New sig2 = raw_sig1 x 0 + raw_sig2 x 1 + raw_sig3 x 0 + raw_sig4 x 0 + raw_sig5 x 0 + raw_sig6 x 0

New sig3 = raw_sig1 x 0 + raw_sig2 x 0 + raw_sig3 x 1 + raw_sig4 x 0 + raw_sig5 x 0 + raw_sig6 x 0

New sig4 = raw_sig1 x 0 + raw_sig2 x 0 + raw_sig3 x 0 + raw_sig4 x 1 + raw_sig5 x 0 + raw_sig6 x 0

New sig5 = raw_sig1 x 0 + raw_sig2 x 0 + raw_sig3 x 0 + raw_sig4 x 0 + raw_sig5 x 1 + raw_sig6 x 0

New sig6 = raw_sig1 x 0 + raw_sig2 x 0 + raw_sig3 x 0 + raw_sig4 x 0 + raw_sig5 x 0 + raw_sig6 x 1

 

New sig7 = raw_sig1 x 1 + raw_sig2 x -1 + raw_sig3 x 0 + raw_sig4 x 0 + raw_sig5 x 0 + raw_sig6 x 0

New sig8 = raw_sig1 x 0 + raw_sig2 x 0 + raw_sig3 x 1 + raw_sig4 x -1 + raw_sig5 x 0 + raw_sig6 x 0

New sig9 = raw_sig1 x 0 + raw_sig2 x 0 + raw_sig3 x 0 + raw_sig4 x 0 + raw_sig5 x 1 + raw_sig6 x -1

 

So that's why the derivation array consist of zero, one's and minus one's. But i can happen that i want to make something like this:

 

New sig10 = raw_sig1 x 0.25 + raw_sig2 x 0.25 + raw_sig3 x 0.25 + raw_sig4 x 0.25 + raw_sig5 x -1 + raw_sig6 x 0

 

This is the case where in an EEG you speak of a "source derivation" you subtract 4 surounding electrodes of the middle one and so on, people have to be free to make all kinds of derivations...

 

I did not found anything on convolution yet...

 

Best regards,

Thijs

 

0 Kudos
Message 4 of 6
(2,481 Views)

ThijsBoeree wrote:

Anyone knows a better solution?


Here's something that gives the same result but looks simpler on paper. Modify as needed.

0 Kudos
Message 5 of 6
(2,470 Views)
Solution
Accepted by topic author ThijsBoeree

Ignore the Convolution comment, you don't need anything that complicated. You just need the A x B.vi as shown below, from the Linear Algebra palette.

DerivationMODAxB.png

0 Kudos
Message 6 of 6
(2,450 Views)