Code covered by the BSD License  

Highlights from
publish2latex

image thumbnail

publish2latex

by

 

09 Apr 2013 (Updated )

Using full Latex markup in m-files to generate high quality documentation. Version 1.3

writeOutFile( fileLines, filePath, fileName )
function writeOutFile( fileLines, filePath, fileName )
%
% Purpose : Give a cell array of file lines, this function writes out the
% the file to disk
%
% Use (syntax):
%
% Input Parameters :
%   fileLines: cell array of file lines 
%   filePath:  path to where the file is to be written
%   fileName:  file name to be generated
%
% Return Parameters :
%
% Description and algorithms:
%
% References : 
%
% Author :  Matther Harker and Paul O'Leary
% Date :    29. Jan 2013
% Version : 1.0
%
% (c) 2013 Matther Harker and Paul O'Leary
% url: www.harkeroleary.org
% email: office@harkeroleary.org
%
% History:
%   Date:           Comment:
%

fid = fopen( [filePath, fileName], 'w');
if fid == -1
    error( ['File ',fileName,' could not be opened.']);
end;
%
noLines = length( fileLines );
%
for k=1:noLines
    fprintf( fid, '%s', fileLines{k} );
end;
%
fclose( fid );

Contact us