Navigation

Operators and Keywords

Function List:

C++ API

Function File: irsa_dft.m

newyp = irsa_resample (xp, yp, newxp, [lm])

Resample the signal represented by the timeseries [XP,yp] on arbitrary samplepoints. newxp

Input:

xp : Columnvector – sampling points

yp : Columnvector – timeseries values

newxp : Vector – sampling points for the resampling

lm : Boolean – use lesser memory if 'true' (slower). Default is 'false'.

Output:

newyp : Columnvector – timeseries values of the resampling

Demonstration 1

The following code

 N = 32; ofac = 16; xp1 = 1.5;
 xp = linspace(0,N-1,N)' + xp1;
 yp = irsa_rgenreal(xp, 0.5);
 [N,cols,regular,T] = irsa_check( xp, yp );
 longxp = linspace(0,N-(1/ofac),N*ofac)' + xp1;
 longyp = irsa_resample( xp, yp, longxp );
 title( "Signal and regular sampling points" ); 
 plot( xp, yp, '@*3', xp, yp, '^3', longxp, longyp, '-1');
 input( "Press  to proceed" );
 mdxp = irsa_mdsp( 0.1,1.9,N/2 ) + xp1;
 mdyp = irsa_resample( xp, yp, mdxp );
 title( "Signal and arbitrary sample points" );
 plot( mdxp, mdyp, '@*3', mdxp, mdyp, '^3', longxp, longyp, '-1');

Produces the following output

Press  to proceed

and the following figure

Figure 1