Home > classes > @ao > fromSpecWin.m

fromSpecWin

PURPOSE ^

FROMSPECWIN Construct an ao from a Spectral window

SYNOPSIS ^

function a = fromSpecWin(a, pli)

DESCRIPTION ^

 FROMSPECWIN Construct an ao from a Spectral window
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 FUNCTION:    fromSpecWin

 DESCRIPTION: Construct an ao from a Spectral window

 CALL:        a = fromSpecWin(a, win)

 PARAMETER:
              win:      Spectral window object

 HISTORY:     07-05-2007 Hewitson
              Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % FROMSPECWIN Construct an ao from a Spectral window
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % FUNCTION:    fromSpecWin
0005 %
0006 % DESCRIPTION: Construct an ao from a Spectral window
0007 %
0008 % CALL:        a = fromSpecWin(a, win)
0009 %
0010 % PARAMETER:
0011 %              win:      Spectral window object
0012 %
0013 % HISTORY:     07-05-2007 Hewitson
0014 %              Creation
0015 %
0016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0017 function a = fromSpecWin(a, pli)
0018 
0019   VERSION = '$Id: fromSpecWin.m,v 1.10 2008/09/04 13:37:14 ingo Exp $';
0020 
0021   % get AO info
0022   ii = ao.getInfo('ao', 'From Window');
0023 
0024   % Set the method version string in the minfo object
0025   ii.setMversion([VERSION '-->' ii.mversion]);
0026 
0027   if isa(pli, 'plist')
0028 
0029     % Add default values
0030     pl = combine(pli, ii.plists);
0031 
0032     win = find(pl, 'win');
0033   elseif isa(pli, 'specwin')
0034     win = pli;
0035     pl  = plist('win', win);
0036   else
0037     error('### Unknow usage.');
0038   end
0039 
0040   % Make a cdata object
0041   a.data = cdata(win.win);
0042   a.setName(win.type, 'internal');
0043 
0044   % Add history
0045   a.addHistory(ii, pl, [], []);
0046 
0047 end
0048

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003