Get points for interpolation in a wave from another wave

Average rating
(1 vote)

I did this by:

Make /O wave1 [0,1,2,3,4,5,6,7,8,9,10]
Make /O wave2 [4,6,9]
 
Variable nop = numpnts(wave1)
Make /O /N=nop wave3=Nan
 
Variable i
for(i=0;i<=numpnts(wave2);i+=1)
    Wave3 [(wave2 [i])] = wave1 [(wave2 [i])]
endfor
 
Interpolate2 wave3

Suspect there must be an easier/faster way, maybe by using a special Parameter of the Interpolate2-command I have missed so far?

Back to top