from
htmltool
by Bjorn Alsberg The HTML Toolbox (HT) stores various crosslink information about Matlab programs using HTML.
com_asc(file)
function [] = com_asc(file)
% [] = com_asc(file)
% This file scan the current directory you are
% working in and makes an ASCII file containing all
% the n first comment lines of each m-file
%
% INPUT PARAMETER
%
% file = name of file containing the m-file
% comment lines
%
% Copyright (c) 1996 B.K. Alsberg
%
fid = fopen(file,'w');
currdir =pwd;
[C,G2,M] = crossref(currdir);
[n,m]=size(G2);
for i = 1:n
filename = deblank(G2(i,:));
filename1 = [currdir,'\',filename];
U = com_read(filename1);
[n2,m2]=size(U);
for j =1:n2
L = U(j,:);
fprintf(fid,'%s \n',L);
end;
if i < n
fprintf(fid,'\n\n');
fprintf(fid,'------------------------------------------------ \n');
fprintf(fid,'\n\n');
end;
end;
fclose(fid);