LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to combine two arrays: original array and the array of its interpolation values

Solved!
Go to solution

we get a new array of values after using interpolation function on an array in labview, but how to combine the original array of values and this interpolated set of values into one single array ??

0 Kudos
Message 1 of 17
(5,305 Views)

Hi Mahisnair,

 

maybe you should explain, what you really want to achieve?

 

You can prepend or append values using BuildArray, you can insert values in between using InsertIntoArray, you can "mix up" values using InterleaveArrays. You really have to say what you need!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 17
(5,291 Views)

build array, interpolate array


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 17
(5,286 Views)

Damn, Too Late!

 

Not sure what you need exactly, need more clarification.

Build Array?

Interleave 1D Array?


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 4 of 17
(5,290 Views)

Post your VI friend. It will be good to debug

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
Message 5 of 17
(5,290 Views)

please run my VI using the input file, in the graph there is shown the an array of values [while dots\line in graph] and its interpolated values[ red in graph]

 

i need a way to get the original array of values and its interpolated value [array] into a single array.

 

 

Download All
0 Kudos
Message 6 of 17
(5,283 Views)

Hi Mahisnair,

 

you still not explain what you want to have! How should the data be arranged?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 17
(5,280 Views)

array A = [ 1, 2, 3, 4 ]

array B = [ 1.2, 1.4,  2.2,  2.4,  2.6 , 3.2, 3.4, 3.6, 3.8 ]

i need,

array C = [1, 1.2, 1.4, 2, 2.2, 2.4, 2.6, 3. 3.2, 3.4, 3.6, 3.8, 4 ]

 

A is the roginal array of values, B is the interpolated values, i need both the values into a single array C

please note tht its not the same number of values to be inserted between  elements of array A to get array C.

0 Kudos
Message 8 of 17
(5,278 Views)

Hi Mahisnair,

 

append using BuildArray, followed by Sort1DArray 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 9 of 17
(5,274 Views)

in my example that logic holds true, but if you run my VI you can see that i dont have the luxury of sorting to get values in place.

after running my Vi- in the graph, white dots is the array A, red dots is the array B;

please run and see

0 Kudos
Message 10 of 17
(5,268 Views)