LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Subtruct Method change

Hi all

    I want to median calculated with 1D array,rule as below:

array[10]-array[0]

array[11]-array[1]

array[12]-array[2]

array[13]-array[3]

 

snapshot has done with  result,someone have other way simple to do that,thanks!!

 

Download All
0 Kudos
Message 1 of 5
(974 Views)

Hi Sam,

 

your difference calculation is quite easy:

 

Please don't call it "Median" as that is something completely different!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(966 Views)

Hi GerdW

    It seems not good,only 10 number is right,the rest is wrong,thanks!!

0 Kudos
Message 3 of 5
(916 Views)

Hi,

 

Your VI will add 20 to the index after every 10 subtraction while GerdW's solution will not skip past any elements. If you want to implement it, take 10 element to subtract then add 20 to the index as how the original VI does it.

Subtract.PNG

0 Kudos
Message 4 of 5
(901 Views)

Hi,

   It's work,I desired that use pointer to handle this case,but I don't do it,who can give me idea to solve this case,thanks!!

0 Kudos
Message 5 of 5
(894 Views)