Home > vbmeg > functions > tool_box > time_frequency > mk_resamp.m

mk_resamp

PURPOSE ^

[y]=mk_resamp(y,newsr,sr);

SYNOPSIS ^

function [y]=mk_resamp(dat,newsr,sr);

DESCRIPTION ^

[y]=mk_resamp(y,newsr,sr);

dat = input file  channels x frames x epoch

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [y]=mk_resamp(dat,newsr,sr);
0002 %[y]=mk_resamp(y,newsr,sr);
0003 %
0004 %dat = input file  channels x frames x epoch
0005 %
0006 % Copyright (C) 2011, ATR All Rights Reserved.
0007 % License : New BSD License(see VBMEG_LICENSE.txt)
0008 
0009 [numchan,numsamp,numepoch]=size(dat);
0010 x=dat(1,:,1);
0011 x=reshape(x,1,length(x));
0012 r=resample(x,newsr,sr);
0013 new_numsamp=length(r);
0014 
0015 y=zeros(numchan,new_numsamp,numepoch);
0016 for i=1:numchan
0017    for j=1:numepoch
0018       x=dat(i,:,j);
0019       x=reshape(x,1,length(x));
0020       r=resample(x,newsr,sr);
0021       y(i,:,j)=r;
0022    end
0023 end
0024 
0025 
0026 
0027

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005