Home > NoiseTools > nt_decimate.m

# nt_decimate

## PURPOSE

y=nt_decimate(x,R) - apply matlab decimate function to columns of matrix

## SYNOPSIS

function y=nt_decimate(x,R)

## DESCRIPTION

    y=nt_decimate(x,R) - apply matlab decimate function to columns of matrix

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

## SOURCE CODE

    0001 function y=nt_decimate(x,R)
    0002 %y=nt_decimate(x,R) - apply matlab decimate function to columns of matrix
    0003 %
    0004
    0005 sz=size(x);
    0006 m=sz(1);
    0007 x=reshape(x,[m,prod(sz(2:end))]);
    0008
    0009 y=zeros(ceil(m/R),prod(sz(2:end)));
    0010
    0011 for k=1:size(y,2);
    0012     y(:,k)=decimate(x(:,k),R)';
    0013 end
    0014
    0015 y=reshape(y,[size(y,1),sz(2:end)]);
    0016