From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interpolate one 2D array to match the size of a 2nd 2D array

Solved!
Go to solution

Dear all,

I have two 2D arrays containing spectrometer data (read from txt files via "read spreadsheet" vi).

X values = wavelength (from 400 - 700 nm), Y values = corresponding amplitude.

 

Problem:

Spectral data have been recorded with two different spectrometers with differing resolution.

Array1 = 1609 data points in the  400 - 700 nm range.

Array2 = 713 data points in the  400 - 700 nm range.

 

How can I interpolate array2 in order to make it 1609 data points as well?

(I need to do calculations with both spectra hence array size need to be the same)

 

Thanks a lot,

Holger

0 Kudos
Message 1 of 3
(941 Views)

Have you checked this example: C:\Program Files (x86)\National Instruments\LabVIEW XXXX\examples\Mathematics\Interpolation\1D Interpolation.vi ? I guess in your case you need to play with xi value, so it will be possible to scale it up to 1609 points.

Message 2 of 3
(909 Views)
Solution
Accepted by topic author 4Holger

Thanks a lot for getting back to me, kosist90!

 

In the meantime I found a powerful yet simple solution using the Resample Waveforms Single Shot vi.

 

For those interested, I attach a screenshot.

 

Thanks again, Holger

 

 

Message 3 of 3
(904 Views)