Home > classes > @fsdata > setFreq.m

setFreq

PURPOSE ^

SETFREQ sets the frequency vector of a fsdata object based on the length of the xx vector and the sample rate.

SYNOPSIS ^

function fsd = setFreq(fsd)

DESCRIPTION ^

 SETFREQ sets the frequency vector of a fsdata object based on the length of the xx vector and the sample rate.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: SETFREQ sets the frequency vector of a fsdata object based on the
              length of the xx vector and the sample rate.

 CALL:        fsd = setFreq(fsd)

 VERSION:     $Id: setFreq.m,v 1.2 2007/07/18 13:58:44 ingo Exp $

 HISTORY:     31-01-2007 M Hewitson
                 Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function fsd = setFreq(fsd)
0002 % SETFREQ sets the frequency vector of a fsdata object based on the length of the xx vector and the sample rate.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: SETFREQ sets the frequency vector of a fsdata object based on the
0007 %              length of the xx vector and the sample rate.
0008 %
0009 % CALL:        fsd = setFreq(fsd)
0010 %
0011 % VERSION:     $Id: setFreq.m,v 1.2 2007/07/18 13:58:44 ingo Exp $
0012 %
0013 % HISTORY:     31-01-2007 M Hewitson
0014 %                 Creation
0015 %
0016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0017 
0018 fsd.f = linspace(0, fsd.fs/2, length(fsd.xx));
0019 fsd = reshapeF(fsd);
0020 
0021 % END

Generated on Mon 03-Sep-2007 12:12:34 by m2html © 2003