LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Aligning and Processing Measured Data with a Fixed Reference Vector in LabVIEW

Solved!
Go to solution

I’m working on a LabVIEW program where I have a fixed reference vector containing 15 expected values. The measurement arrays I’m processing contain rows with fewer than 15 values, which are often incomplete or misaligned.

My goal is to reconstruct each row so that it contains exactly 15 values aligned with the reference vector. For each value in the reference vector, if a measured value within a tolerance of ±3 is found, I keep it; otherwise, I insert a 0 at that position.

I’m having trouble implementing this logic in LabVIEW, especially with array traversal and conditional insertion. I’m attaching my current LabVIEW program and would greatly appreciate any ideas or solutions to solve this problem.

For example, given this reference vector (always 15 values):
[3, 3.99, 14, 18, 22.66, 30, 34, 39, 44, 49, 55, 61, 67, 76, 80]
and a detected measurement row (only 13 values):
[3, 9, 19, 35, 39, 43, 45, 49, 63, 69, 73, 80, 84]
the expected corrected output is:
[3, 0, 0, 19, 0, 0, 35, 39, 43, 49, 0, 63, 69, 73, 80].

0 Kudos
Message 1 of 4
(134 Views)

Are the values in each vector (sic) (or row) guaranteed to be sorted?

Shouldn't the output be a 2D array with N corrected rows?

0 Kudos
Message 2 of 4
(109 Views)
Solution
Accepted by topic author elbazi05

I have no idea if this is what you want, but maybe it can give you some general ideas.

 

altenbach_0-1749597260811.png

 

altenbach_1-1749597294909.png

 

Message 3 of 4
(93 Views)

Thank you for your feedback, it helped me a lot

0 Kudos
Message 4 of 4
(60 Views)