LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compare two 1D Arrays minimal/max distance value

Solved!
Go to solution

Hello guys,

I have an 1D-Array. And want to compare that with other 1D Array of minimum distance and maximum distance. The problem is the one Array have not a constant step size. In one step he have +10 and the other +11 and then again +10 ...

I want to calculate from two arrays the minimal and maximal difference. 

Is there any example in LabVIEW?

0 Kudos
Message 1 of 24
(706 Views)

It will be more informative if you post your code and show how the data is being generated.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 2 of 24
(683 Views)
  • What is your definition of "distance" between two arrays?
  • All arrays have a constant step size of one element per index, so define what you mean by your statement
  • Where does the "other" 1D array come from?
  • What does the data represent?

 

Is this related to any of you other similar threads? Maybe it would be easier to keep it all in one place.

 

What problem are you actually trying to solve?

 

0 Kudos
Message 3 of 24
(648 Views)

I mean one array has a stepszize from 10 and the other has changing stepsize +10 +11 +10+11 

 

0 Kudos
Message 4 of 24
(612 Views)

@medum wrote:

I mean one array has a stepszize from 10 and the other has changing stepsize +10 +11 +10+11 

 


You are not making any sense. A 1D DBL array only has index/value pairs. There is no variable steps size unless this is a 1D complex array where e.g. RE is the X value or if this is an 1D array of xy point clusters.

 

You need to be significantly more specific!

 

If they data is x/y, you can compare the y values by e.g. interpolating, bringing both arrays to a common x ramp.

 

 

0 Kudos
Message 5 of 24
(585 Views)

how is that look likes in LabVIEW

0 Kudos
Message 6 of 24
(554 Views)

@medum wrote:

how is that look likes in LabVIEW


 

What is "that"? You need to use more words!

0 Kudos
Message 7 of 24
(548 Views)

sorry.

First if I have an an array with constant step size. 

The other has differenz step size changing + 10, 11+ 10 and so an

 

For example: 

x = 1,11,21,31,41,51,61,71,81,91,101

y = 1,11,22, 32, 43, 53, 64, 74, …

 

What do u see? Because of the changing step size in y the difference between the values are growing.

I thought first of all that are const  the difference. Iwould use the mean (10+11)/2 and then check with range and coerce that my values into the range. 

But i think that is not working. Idk what can I do 😕

0 Kudos
Message 8 of 24
(532 Views)

If the step sizes are correct you can simply upscale each array with the step size and you'll get 1 value/1 step. If the step size is dynamic it's messier, but the same logic applies.

 

If array 1 is:

(1,0),(11,2),(21,3) and you upscale with a factor 10 you should get a value for 1,2,3,4...

 

If array 2 is:

(1,0),(12,2),(23,3) and you upscale with a factor 11 you should get a value for 1,2,3,4...

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 24
(521 Views)

How it is look like in LabVIEW?

Do u have an example?

0 Kudos
Message 10 of 24
(504 Views)