Home > classes > @ao > export.m

export

PURPOSE ^

EXPORT export an analysis object to a text file.

SYNOPSIS ^

function export(a, fname)

DESCRIPTION ^

 EXPORT export an analysis object to a text file.

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

 DESCRIPTION: EXPORT export an analysis object to a text file.

 CALL:        export(a, 'blah.txt');

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

 HISTORY: 30-03-07 M Hewitson
             Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function export(a, fname)
0002 % EXPORT export an analysis object to a text file.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: EXPORT export an analysis object to a text file.
0007 %
0008 % CALL:        export(a, 'blah.txt');
0009 %
0010 % VERSION:     $Id: export.m,v 1.4 2007/07/18 13:58:44 ingo Exp $
0011 %
0012 % HISTORY: 30-03-07 M Hewitson
0013 %             Creation
0014 %
0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0016 
0017 if isa(a, 'ao')
0018 
0019   d = a.data;
0020 
0021   [x,y] = get_xy_axis(a.data);
0022 
0023   if isreal(y)
0024     out = [x y];
0025   else
0026     out = [x real(y) imag(y)];
0027   end
0028 
0029   save(fname, 'out', '-ASCII', '-DOUBLE', '-TABS');
0030 
0031 else
0032   error('### incorrect usage: first argument should be an AO.');
0033 end
0034 
0035 % END
0036

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