Showing results for 
Search instead for 
Did you mean: 

spline interpolation just introduces noise

Hi All 


I have a dataset, and I need it to have  a specific number of data points (for comparison purposes, with other datasets). Naturally, I think to use interpolation. 1D linear interpolation works ok, but it isn't as smooth as I'd like, so I thought I'd try spline interpolation.


But see the attached VI (my dataset, the Raman spectra of Paracetemol [counts vs. wavelength in wavenumbers] should be initialized - just hit play to see what I mean). Why does it introduce so much noise? Is there some silly thing I'm doing? Been banging my head agaqinst the keyboard all day, I don't see the problem. Thank you so much for any help... 

0 Kudos
Message 1 of 4

Here's the 2010 version for those who may not have 2011. Also, a picture of the VI

Download All
0 Kudos
Message 2 of 4



why do you interleave the original and interpolated array? If you feed your "Interpolates" array into a graph you will see it looks alright.

Looking at the graphical representation of the original and interpolated array will also show you why piecing them together the way you do leads to the noisy look in "after"

Just create the array of interpolates with the number of elements you desire an use that.


Best regards Florian

Message 3 of 4

I see what you're saying. But the whole point isn't to have a graph of interpolates, it's to have a graph with more points than the original. I'll look into integrating them more intelligently; or perhaps just build a bigger plot of interpolates (maybe easier?).


edit: hah, yes, I just increased the number of interpolates to Y_array_size+length difference. I don't have to bother with integrating the two which is complicated and error prone. 


Thanks for helping me see the solution. 

Message 4 of 4