LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to subtract ith position of one array from the ith position of another

Solved!
Go to solution

Hi, everyone,

 

In my program, I subract one array from another. It should be like X(i) - Y(i)

Can someone explain to me how I can make sure that I'm subracting ith value of array 2 from the ith value of array one?  Not , for example, X(i)- Y(i+1)?

 

 

Thank you

 

 

0 Kudos
Message 1 of 4
(3,333 Views)
Solution
Accepted by nwg

In LabVIEW the polymorphism of the substrat function let's you directly substract one array from the other. If I understand you correctly, this will be what you want.

Also seems that you are new to the concepts: Take a look at the auto-indexing posibillities of for loops.

 

Felix

Message 2 of 4
(3,324 Views)

Hopefully, you are not doing anything more complicated than this:

 

 

 

This does X(i) - Y(i).

Message Edited by Dennis Knutson on 12-21-2009 10:59 AM
Message 3 of 4
(3,323 Views)

Thanks everyone.

I am using subtract function, but I wasn't sure if it did X(i)-Y(i).

0 Kudos
Message 4 of 4
(3,311 Views)