function writeindex(&p) secnames = fieldnames(p.section_descriptors); for n=1:numel(secnames) writesectiontable(secnames{n},p.sectables.(secnames{n}),p); end fp = fopen(sprintf('%s/help/html/index.html',p.sourcepath),'w'); fprintf(fp,['\n']); fprintf(fp,'\n'); fprintf(fp,'\n'); fprintf(fp,'\n'); fprintf(fp,'%s Documentation\n',verstring); fprintf(fp,'\n'); fprintf(fp,'\n'); fprintf(fp,'

%s Documentation

\n',verstring); fprintf(fp,'

\n'); fprintf(fp,'

Documentation Sections

\n'); fprintf(fp,'\n'); fprintf(fp,'\n'); fprintf(fp,'\n'); fclose(fp); fp = fopen(sprintf('%s/help/html/modules.txt',p.sourcepath),'w'); modulenames = {}; for n=1:numel(secnames) section = secnames{n}; modules = p.sectables.(secnames{n}); for k=1:size(modules,1); modulenames = [modulenames;{[modules{k,1} ' (' section ')']}]; end end modulenames = sort(modulenames); for n = 1:numel(modulenames) fprintf(fp,'%s\n',modulenames{n}); end fclose(fp); fp = fopen(sprintf('%s/help/html/sectable.txt',p.sourcepath),'w'); for n=1:numel(secnames) section = secnames{n}; fprintf(fp,'%s\n',p.section_descriptors.(section)); modulelist = sort(p.sectables.(section)(:,2)); for k=1:numel(modulelist) fprintf(fp,'+(%s) %s',section,modulelist{k}); end end fclose(fp); function writesectiontable(secname,modules,&p) fp = fopen(sprintf('%s/help/html/sec_%s.html',p.sourcepath,secname), ... 'w'); fprintf(fp,['\' ... 'n']); fprintf(fp,'\n'); fprintf(fp,'\n'); fprintf(fp,'\n'); fprintf(fp,'%s\n',p.section_descriptors.(secname)); fprintf(fp,'\n'); fprintf(fp,'\n'); fprintf(fp,'

%s

\n',p.section_descriptors.(secname)); fprintf(fp,'

\n'); fprintf(fp,' Main Index \n'); fprintf(fp,'

\n'); fprintf(fp,'

\n'); fprintf(fp,'\n'); fprintf(fp,'\n'); fclose(fp);