Home > atmlab > arts > text2cfile.m

text2cfile

PURPOSE ^

TEXT2CFILE Help function to create a small ARTS cfile

SYNOPSIS ^

function aos = text2cfile( varargin )

DESCRIPTION ^

 TEXT2CFILE   Help function to create a small ARTS cfile

    The input to the function is a string giving each row of the control
    file to create. The initial 'Arts{' and end '}' are included
    automaticlly (and should not be part of the function input).

    All text strings are joined into an array of string *aos*.

 FORMAT aos = text2cfile( s1, s2, ... )

 OUT   aos  An array of string, see above.
 IN    s1   First input string
       ...

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

text2cfile.m

SOURCE CODE ^

0001 % TEXT2CFILE   Help function to create a small ARTS cfile
0002 %
0003 %    The input to the function is a string giving each row of the control
0004 %    file to create. The initial 'Arts{' and end '}' are included
0005 %    automaticlly (and should not be part of the function input).
0006 %
0007 %    All text strings are joined into an array of string *aos*.
0008 %
0009 % FORMAT aos = text2cfile( s1, s2, ... )
0010 %
0011 % OUT   aos  An array of string, see above.
0012 % IN    s1   First input string
0013 %       ...
0014 
0015 % 2014-09-13 Patrick Eriksson
0016 
0017 function aos = text2cfile( varargin )
0018 
0019 if atmlab('STRICT_ASSERT') & ~iscellstr(varargin)
0020   error( 'All input arguments must be strings' );
0021 end
0022   
0023 aos{1} = 'Arts2{'; 
0024 
0025 for i = 1 : length(varargin)
0026   aos{1+i} = varargin{i};
0027 end
0028 
0029 aos{end+1} = '}';

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005