plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | aristofanio/freemat-master | doenumerate.m | .m | freemat-master/FreeMat/toolbox/help/@latexwriter/doenumerate.m | 282 | utf_8 | 62048ca388fb45accd7e4be23d9a69f7 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doenumerate(&p,itemlist)
fprintf(p.myfile,'\\begin{enumerate}\n');
for i=1:numel(itemlist)
fprintf(p.myfile,'\\item %s\n',expand_codes(itemlist{i}));
end
fprintf(p.myfile,'\\end{enumerate}\n');
|
github | aristofanio/freemat-master | beginmodule.m | .m | freemat-master/FreeMat/toolbox/help/@latexwriter/beginmodule.m | 862 | utf_8 | 9ceb3b2e321cc3f450b6c66ae05e3ae2 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function beginmodule(&p,sourcepath,modname,moddesc,secname, ...
section_descriptors)
p.moddesc = moddesc;
p.secname = lower(secname);
p.modulename = lower(modname);
p.section_descriptors = section_descriptors;
p.sou... |
github | aristofanio/freemat-master | writeindex.m | .m | freemat-master/FreeMat/toolbox/help/@latexwriter/writeindex.m | 1,112 | utf_8 | 81c67c02cc90d6792c0c57743116e4a0 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function writeindex(&p)
secnames = fieldnames(p.section_descriptors);
fp = fopen(sprintf('%s/help/latex/FreeMat-%s.tex',p.sourcepath,version),'w');
fprintf(fp,'\\documentclass{book}\n');
fprintf(fp,'\\usepackage{graphicx}\n');
fprintf(fp,'\\usepa... |
github | aristofanio/freemat-master | latexwriter.m | .m | freemat-master/FreeMat/toolbox/help/@latexwriter/latexwriter.m | 449 | utf_8 | e25d4e5f46660d66c615dba319e9fb49 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function p = latexwriter(a)
if (nargin == 0)
p.myfile = -1;
p.sectables = {};
p.verbatim = false;
p.modulename = '';
p.groupname = '';
p.ignore = false;
p.section_descriptors = [];
p.sourcepath = '';
p = class(p,'latex... |
github | aristofanio/freemat-master | endverbatim.m | .m | freemat-master/FreeMat/toolbox/help/@latexwriter/endverbatim.m | 155 | utf_8 | 8da87fab126d8d38529f54911496efef |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function endverbatim(&p)
fprintf(p.myfile,'\\end{verbatim}\n');
p.verbatim = false;
|
github | aristofanio/freemat-master | beginverbatim.m | .m | freemat-master/FreeMat/toolbox/help/@latexwriter/beginverbatim.m | 163 | utf_8 | 259a3a8b41ebd94435b53ee32e1933ee |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function beginverbatim(&p,text)
fprintf(p.myfile,'\\begin{verbatim}\n');
p.verbatim = true;
|
github | aristofanio/freemat-master | dofile.m | .m | freemat-master/FreeMat/toolbox/help/@latexwriter/dofile.m | 269 | utf_8 | c00debd1cb032535deea77ba6a3f62a9 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function dofile(&p,filename,textstring)
fprintf(p.myfile,'\\begin{verbatim}\n');
fprintf(p.myfile,' %s\n',filename);
fprintf(p.myfile,'%s',textstring);
fprintf(p.myfile,'\\end{verbatim}\n');
|
github | aristofanio/freemat-master | dofigure.m | .m | freemat-master/FreeMat/toolbox/help/@latexwriter/dofigure.m | 222 | utf_8 | 3308d5028191ebe2b64c4f3ed25198c3 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function dofigure(&p,figname)
fprintf(p.myfile,'\n\n');
fprintf(p.myfile,'\\centerline{\\includegraphics[width=8cm]{%s}}\n\n', ...
figname);
|
github | aristofanio/freemat-master | outputtext.m | .m | freemat-master/FreeMat/toolbox/help/@latexwriter/outputtext.m | 235 | utf_8 | 86ae888bf1936845022ab2455f0a2f58 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function outputtext(&p,text)
if (p.ignore) return; end
if (p.verbatim)
fprintf(p.myfile,'%s',text);
else
fprintf(p.myfile,'%s',expand_codes(text));
end
|
github | aristofanio/freemat-master | endmodule.m | .m | freemat-master/FreeMat/toolbox/help/@latexwriter/endmodule.m | 110 | utf_8 | e38c59c7d0a738897cada22b8fd385ff |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function endmodule(&p)
fclose(p.myfile);
|
github | aristofanio/freemat-master | begingroup.m | .m | freemat-master/FreeMat/toolbox/help/@latexwriter/begingroup.m | 275 | utf_8 | 9b4f66d059300a9d0d7d732c3601dc35 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function begingroup(&p,groupname)
p.groupname = groupname;
if (strcmp(lower(groupname),'tests'))
p.ignore = 1;
else
fprintf(p.myfile,'\\subsection{%s}\n\n',p.groupname);
p.ignore = 0;
end
|
github | aristofanio/freemat-master | expand_codes.m | .m | freemat-master/FreeMat/toolbox/help/@latexwriter/private/expand_codes.m | 154 | utf_8 | 827c47c4cff51565540ef2f36872a77e |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function text = expand_codes(text)
text = regexprep(text,'\@\|([^\|]*)\|','\verb|$1|');
|
github | aristofanio/freemat-master | doequation.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/doequation.m | 161 | utf_8 | 8548ad779c0b3fb4a1e5b97955c6ff80 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doequation(&p,eqn)
for i = 1:numel(p.clients)
doequation(p.clients{i},eqn);
end
|
github | aristofanio/freemat-master | doitemize.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/doitemize.m | 163 | utf_8 | 56a08147f3a3503af6d224f0997f14cc |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doitemize(&p,enums)
for i = 1:numel(p.clients)
doitemize(p.clients{i},enums);
end
|
github | aristofanio/freemat-master | docomputeblock.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/docomputeblock.m | 201 | utf_8 | 04dce9e2066c46528d1d59c015e5a9b8 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function docomputeblock(&p,cmds,errorsexpected)
for i = 1:numel(p.clients)
docomputeblock(p.clients{i},cmds,errorsexpected);
end
|
github | aristofanio/freemat-master | doenumerate.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/doenumerate.m | 167 | utf_8 | 5c633dd114884b1428441e1d3152fab9 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doenumerate(&p,enums)
for i = 1:numel(p.clients)
doenumerate(p.clients{i},enums);
end
|
github | aristofanio/freemat-master | beginmodule.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/beginmodule.m | 265 | utf_8 | c1bd8e98ea529f371a131a966a5b6ea7 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function beginmodule(&p,sourcepath,modname,moddesc,secname,section_descriptors)
for i = 1:numel(p.clients)
beginmodule(p.clients{i},sourcepath,modname,moddesc,secname,section_descriptors);
end
|
github | aristofanio/freemat-master | writeindex.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/writeindex.m | 153 | utf_8 | 24ac03f8e6ce47a24cce7465bc1ae011 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function writeindex(&p)
for i = 1:numel(p.clients)
writeindex(p.clients{i});
end
|
github | aristofanio/freemat-master | endverbatim.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/endverbatim.m | 153 | utf_8 | dad2a2c38d4e54bca11972addc3c109b |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function endverbatim(&p)
for i=1:numel(p.clients)
endverbatim(p.clients{i});
end
|
github | aristofanio/freemat-master | groupwriter.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/groupwriter.m | 268 | utf_8 | 854967b6e80c488ad264324fe43c2aba |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function p = groupwriter(a)
if (nargin == 0)
p.clients = {};
p = class(p,'groupwriter');
elseif isa(a,'groupwriter')
p = a;
else
p.clients = a;
p = class(p,'groupwriter');
end
|
github | aristofanio/freemat-master | beginverbatim.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/beginverbatim.m | 157 | utf_8 | 685ca2074d6e44d68b334ad286e905ca |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function beginverbatim(&p)
for i=1:numel(p.clients)
beginverbatim(p.clients{i});
end
|
github | aristofanio/freemat-master | dofile.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/dofile.m | 173 | utf_8 | 7ba5d24f343e503d0e65e67bb6bbee9f |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function dofile(&p,filename,text)
for i = 1:numel(p.clients)
dofile(p.clients{i},filename,text);
end
|
github | aristofanio/freemat-master | dofigure.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/dofigure.m | 165 | utf_8 | 3622f2877ab74bc9f16b8b5e506968ea |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function dofigure(&p,figname)
for i = 1:numel(p.clients)
dofigure(p.clients{i},figname);
end
|
github | aristofanio/freemat-master | outputtext.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/outputtext.m | 161 | utf_8 | 1431143f1ac524969a7b2cea3a1d1946 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function outputtext(&p,text)
for i=1:numel(p.clients)
outputtext(p.clients{i},text);
end
|
github | aristofanio/freemat-master | endmodule.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/endmodule.m | 149 | utf_8 | e8417ecd441b00c2ec7570ab2d11956c |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function endmodule(&p)
for i=1:numel(p.clients)
endmodule(p.clients{i});
end
|
github | aristofanio/freemat-master | begingroup.m | .m | freemat-master/FreeMat/toolbox/help/@groupwriter/begingroup.m | 173 | utf_8 | 1d716f03b9326c7c02a47cea056e852f |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function begingroup(&p,groupname)
for i = 1:numel(p.clients)
begingroup(p.clients{i},groupname);
end
|
github | aristofanio/freemat-master | doequation.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/doequation.m | 92 | utf_8 | 743ccffce11fb25e6113b372664686c0 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doequation(&p,eqn)
|
github | aristofanio/freemat-master | doitemize.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/doitemize.m | 93 | utf_8 | 83490d7335a8b17abb225a4c6c736306 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doitemize(&p,enums)
|
github | aristofanio/freemat-master | docomputeblock.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/docomputeblock.m | 112 | utf_8 | eca456704d25cae09a39815706862f02 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function docomputeblock(&p,cmds,errorsexpected)
|
github | aristofanio/freemat-master | doenumerate.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/doenumerate.m | 98 | utf_8 | dd47da6ecfc4e110e1112dc72a272de5 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doenumerate(&p,itemlist)
|
github | aristofanio/freemat-master | beginmodule.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/beginmodule.m | 369 | utf_8 | 82bc54d973ee40ecb12f99fec92f49e9 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function beginmodule(&p,sourcepath,modname,moddesc,secname,section_descriptors)
p.moddesc = moddesc;
p.secname = lower(secname);
p.modulename = lower(modname);
p.section_descriptors = section_descriptors;
p.sourcepath = sourcepath;
... |
github | aristofanio/freemat-master | writeindex.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/writeindex.m | 523 | utf_8 | 486c2085c9a476dd1014b4fc365bae38 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function writeindex(&p)
fname = sprintf('%s/toolbox/test/run_gen_all.m', ...
p.sourcepath);
fp = fopen(fname,'w');
if (fp < 0)
error(sprintf('unable to open %s for output',filename));
end
fprintf(fp,'tlist = dir(''gen_*.m'');\n');
fprintf... |
github | aristofanio/freemat-master | endverbatim.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/endverbatim.m | 89 | utf_8 | b37a349e2c158a8bded81cc418ca39ad |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function endverbatim(&p)
|
github | aristofanio/freemat-master | testwriter.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/testwriter.m | 497 | utf_8 | ae6f5949f08f3c3fbb98f64121eb2628 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function p = testwriter(a)
if (nargin == 0)
p.myfile = -1;
p.sectables = {};
p.eqnlist = {};
p.verbatim = false;
p.modulename = '';
p.groupname = '';
p.ignore = false;
p.section_descriptors = [];
p.sourcepath = '';
... |
github | aristofanio/freemat-master | beginverbatim.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/beginverbatim.m | 117 | utf_8 | 7db4f8ffdeb2f396cb67c3b04589fb05 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function beginverbatim(&p,text)
p.verbatim = true;
|
github | aristofanio/freemat-master | dofile.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/dofile.m | 104 | utf_8 | e21605e33b7ba0ecf8faf9e1b70512cb |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function dofile(&p,filename,textstring)
|
github | aristofanio/freemat-master | dofigure.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/dofigure.m | 94 | utf_8 | a03535885f8755b65088f991b84c1bc4 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function dofigure(&p,figname)
|
github | aristofanio/freemat-master | outputtext.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/outputtext.m | 7,650 | utf_8 | 495e010dbe7e98c4f8ffe86205eee321 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function outputtext(&p,text)
if (p.ignore) return; end
text(end) = [];
v = regexp(text,'@\$([^#]*)#([^#]*)#?(.*)','tokens');
if (isempty(v))
printf(sprintf('bad line: %s',text));
return;
end
% Search for inputs
ttype = v{1}{1};
if (... |
github | aristofanio/freemat-master | endmodule.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/endmodule.m | 87 | utf_8 | 6a026f94538013e34483665e77b97610 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function endmodule(&p)
|
github | aristofanio/freemat-master | begingroup.m | .m | freemat-master/FreeMat/toolbox/help/@testwriter/begingroup.m | 215 | utf_8 | 6be6c95eb65b062893947e48b986bee3 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function begingroup(&p,groupname)
p.groupname = groupname;
if (~strcmp(lower(groupname),'tests'))
p.ignore = 1;
else
p.ignore = 0;
end
|
github | aristofanio/freemat-master | doequation.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/doequation.m | 92 | utf_8 | 743ccffce11fb25e6113b372664686c0 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doequation(&p,eqn)
|
github | aristofanio/freemat-master | doitemize.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/doitemize.m | 212 | utf_8 | 2107b44d62bff8082cb44d07594a3031 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doitemize(&p,enums)
if (p.ignore), return; end;
for i=1:numel(enums)
fprintf(p.myfile,' - %s\n',expand_codes(enums{i}));
end
|
github | aristofanio/freemat-master | docomputeblock.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/docomputeblock.m | 112 | utf_8 | eca456704d25cae09a39815706862f02 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function docomputeblock(&p,cmds,errorsexpected)
|
github | aristofanio/freemat-master | doenumerate.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/doenumerate.m | 223 | utf_8 | 86765f2bbe17554c0f7f7454aedd9313 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doenumerate(&p,itemlist)
if (p.ignore) return; end;
for i=1:numel(itemlist)
fprintf(p.myfile,' %d. %s\n',i,expand_codes(itemlist{i}));
end
|
github | aristofanio/freemat-master | beginmodule.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/beginmodule.m | 794 | utf_8 | 49272aacaa3153fc8017b9bf67e81903 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function beginmodule(&p,sourcepath,modname,moddesc,secname,section_descriptors)
p.moddesc = moddesc;
p.secname = lower(secname);
p.modulename = lower(modname);
p.section_descriptors = section_descriptors;
p.sourcepath = sourcepath;
... |
github | aristofanio/freemat-master | writeindex.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/writeindex.m | 88 | utf_8 | f0f7b1a4cea028dfd84edbb908150e88 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function writeindex(&p)
|
github | aristofanio/freemat-master | endverbatim.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/endverbatim.m | 170 | utf_8 | 9dc7328583d72b02d7c9efe98e272c22 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function endverbatim(&p)
if (p.ignore); return; end;
fprintf(p.myfile,'\n');
p.verbatim = false;
|
github | aristofanio/freemat-master | beginverbatim.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/beginverbatim.m | 171 | utf_8 | 2c970f22cd1da76cdacaedcbc60aeec4 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function beginverbatim(&p,text)
if (p.ignore) return; end
p.verbatim = true;
fprintf(p.myfile,'\n');
|
github | aristofanio/freemat-master | dofile.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/dofile.m | 104 | utf_8 | e21605e33b7ba0ecf8faf9e1b70512cb |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function dofile(&p,filename,textstring)
|
github | aristofanio/freemat-master | dofigure.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/dofigure.m | 94 | utf_8 | a03535885f8755b65088f991b84c1bc4 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function dofigure(&p,figname)
|
github | aristofanio/freemat-master | outputtext.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/outputtext.m | 169 | utf_8 | 3efc3cdc5e27765217116f574bd7f93d |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function outputtext(&p,text)
if (p.ignore) return; end
fprintf(p.myfile,'%s',expand_codes(text));
|
github | aristofanio/freemat-master | textwriter.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/textwriter.m | 465 | utf_8 | b052fa5c94f0c9e5b3ee9765e4a5af2e |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function p = textwriter(a)
if (nargin == 0)
p.myfile = -1;
p.sectables = {};
p.eqnlist = {};
p.verbatim = false;
p.modulename = '';
p.groupname = '';
p.ignore = false;
p.section_descriptors = [];
p.sourcepath = '';
... |
github | aristofanio/freemat-master | endmodule.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/endmodule.m | 124 | utf_8 | 254a6ecd93d083a6f0ce04f05a66cd20 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function endmodule(&p)
fclose(p.myfile);
p.myfile = -1;
|
github | aristofanio/freemat-master | begingroup.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/begingroup.m | 250 | utf_8 | fdf25004aa845b679de7aa1418fdef3a |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function begingroup(&p,groupname)
p.groupname = groupname;
if (~strcmp(lower(groupname),'usage'))
p.ignore = 1;
else
fprintf(p.myfile,'Usage\n\n');
p.ignore = 0;
end
|
github | aristofanio/freemat-master | expand_codes.m | .m | freemat-master/FreeMat/toolbox/help/@textwriter/private/expand_codes.m | 150 | utf_8 | 6b1043dbe130154daaca2c1ff7f290e3 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function text = expand_codes(text)
text = regexprep(text,'\@\|([^\|]*)\|','$1');
|
github | aristofanio/freemat-master | doequation.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/doequation.m | 359 | utf_8 | c323dce606dd9e343765de0875ed2c56 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doequation(&p,eqn)
p.eqnlist = [p.eqnlist,{eqn}];
fprintf(p.myfile,'<P>\n');
fprintf(p.myfile,'<DIV ALIGN="CENTER">\n');
fprintf(p.myfile,'<IMG SRC="%s_eqn%d.png">\n',p.modulename, ...
numel(p.eqnlist));
fprintf(p.myfile,'</DIV... |
github | aristofanio/freemat-master | doitemize.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/doitemize.m | 264 | utf_8 | 6966bd27ff919bcfb3d3da6a920206a2 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doitemize(&p,enums)
fprintf(p.myfile,'<UL>\n');
for i=1:numel(enums)
fprintf(p.myfile,'<LI> %s </LI>\n',expand_codes(latin_filter(enums{i})));
end
fprintf(p.myfile,'</UL>\n');
|
github | aristofanio/freemat-master | docomputeblock.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/docomputeblock.m | 112 | utf_8 | eca456704d25cae09a39815706862f02 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function docomputeblock(&p,cmds,errorsexpected)
|
github | aristofanio/freemat-master | doenumerate.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/doenumerate.m | 272 | utf_8 | 1581a276037fb9b268ac819555cb9c03 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function doenumerate(&p,itemlist)
fprintf(p.myfile,'<OL>\n');
for i=1:numel(itemlist)
fprintf(p.myfile,'<LI> %s </LI>\n',expand_codes(latin_filter(itemlist{i})));
end
fprintf(p.myfile,'</OL>\n');
|
github | aristofanio/freemat-master | beginmodule.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/beginmodule.m | 1,276 | utf_8 | 629ba7da718317044fccd9c5dbba9049 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function beginmodule(&p,sourcepath,modname,moddesc,secname,section_descriptors)
p.moddesc = moddesc;
p.secname = lower(secname);
p.modulename = lower(modname);
p.section_descriptors = section_descriptors;
p.sourcepath = sourcepath;
... |
github | aristofanio/freemat-master | writeindex.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/writeindex.m | 2,614 | utf_8 | 862ac0fa018a043faecb21c914c42c5b |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
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,['<!DOCT... |
github | aristofanio/freemat-master | endverbatim.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/endverbatim.m | 151 | utf_8 | 6e806e1475ff877222343c58187a54ca |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function endverbatim(&p)
fprintf(p.myfile,'</PRE>\n<P>\n');
p.verbatim = false;
|
github | aristofanio/freemat-master | beginverbatim.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/beginverbatim.m | 148 | utf_8 | 4d1de1c06cee49d7b435c49a2e615a0d |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function beginverbatim(&p,text)
fprintf(p.myfile,'<PRE>\n');
p.verbatim = true;
|
github | aristofanio/freemat-master | dofile.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/dofile.m | 326 | utf_8 | 4ede2d370ce7b8f1c4fd542db2f46ccb |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function dofile(&p,filename,textstring)
if (p.ignore), return; end;
fprintf(p.myfile,'<P>\n<PRE>\n');
fprintf(p.myfile,' %s\n',filename);
fprintf(p.myfile,'%s\n',latin_filter(textstring));
fprintf(p.myfile,'</PRE>\n');
fprintf(p.myfile,'<P>... |
github | aristofanio/freemat-master | dofigure.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/dofigure.m | 285 | utf_8 | 8bb30b48b9a517cd2dbaa4d1f58ffdaf |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function dofigure(&p,figname)
fprintf(p.myfile,'<P>\n');
fprintf(p.myfile,'<DIV ALIGN="CENTER">\n');
fprintf(p.myfile,'<IMG SRC="%s.png">\n',figname);
fprintf(p.myfile,'</DIV>\n');
fprintf(p.myfile,'<P>\n');
|
github | aristofanio/freemat-master | outputtext.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/outputtext.m | 264 | utf_8 | 532dcadd95fbe6d9cec125afa045d2bd |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function outputtext(&p,text)
if (p.ignore) return; end
text = latin_filter(text);
if (p.verbatim)
fprintf(p.myfile,'%s',text);
else
fprintf(p.myfile,'%s',expand_codes(text));
end
|
github | aristofanio/freemat-master | htmlwriter.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/htmlwriter.m | 465 | utf_8 | dc55f0ae2ae6f5cf5001115776ac7680 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function p = htmlwriter(a)
if (nargin == 0)
p.myfile = -1;
p.sectables = {};
p.eqnlist = {};
p.verbatim = false;
p.modulename = '';
p.groupname = '';
p.ignore = false;
p.section_descriptors = [];
p.sourcepath = '';
... |
github | aristofanio/freemat-master | endmodule.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/endmodule.m | 1,065 | utf_8 | f10557ed540571883c91a4aff9e302a9 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function endmodule(&p)
fprintf(p.myfile,'</BODY>\n');
fprintf(p.myfile,'</HTML>\n');
fclose(p.myfile);
p.myfile = -1;
if (~isempty(p.eqnlist))
fp = fopen(sprintf('../tmp/%s_eqn.tex',p.modulename),'w');
fprintf(fp,'\\documentclass{article}... |
github | aristofanio/freemat-master | begingroup.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/begingroup.m | 263 | utf_8 | 9492b1b7c3024a68190ffd29aeb0c820 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function begingroup(&p,groupname)
p.groupname = groupname;
if (strcmp(lower(groupname),'tests'))
p.ignore = 1;
else
fprintf(p.myfile,'<H3>%s</H3>\n',groupname);
p.ignore = 0;
end
|
github | aristofanio/freemat-master | expand_codes.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/private/expand_codes.m | 213 | utf_8 | b39bd382b15d89bad44b8bd21a44c035 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function text = expand_codes(text)
text = regexprep(text,'\@\|([^\|]*)\|','<code>$1</code>');
if (strcmp(text,'\n'))
text = '<P>\n';
end
|
github | aristofanio/freemat-master | latin_filter.m | .m | freemat-master/FreeMat/toolbox/help/@htmlwriter/private/latin_filter.m | 208 | utf_8 | f541a45f6b7dd2e130fcdd219ea15249 |
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function otext = latin_filter(text)
otext = strrep(text,'&','&');
otext = strrep(otext,'<','<');
otext = strrep(otext,'>','>');
|
github | aristofanio/freemat-master | trapz.m | .m | freemat-master/FreeMat/toolbox/funfun/trapz.m | 975 | utf_8 | 94c9ade557a45495ede5d58b970af904 | % DOCBLOCK num_trapz
% Copyright (c) 2008 Timothy Cyders
% Licensed under the GPL
function ret = trapz(x,y)
ret=0;
if nargin == 1
if isvector(x) %%x is vector, unit integration
for i = 2:length(x)
ret = ret + (x(i)+x(i-1))/2;
end
else
for ... |
github | aristofanio/freemat-master | cumtrapz.m | .m | freemat-master/FreeMat/toolbox/funfun/cumtrapz.m | 1,108 | utf_8 | 06563e2ed249a496c8d8801ef8066cb3 | % DOCBLOCK num_cumtrapz
% Copyright (c) 2008 Timothy Cyders
% Licensed under the GPL
function ret = cumtrapz(x,y)
ret=0;
if nargin == 1
if isvector(x) %%x is vector, unit integration
ret(1) = 0;
for i = 2:length(x)
ret(i) = ret(i-1) + (x(i)+x(i-1))/2;
en... |
github | aristofanio/freemat-master | ode45.m | .m | freemat-master/FreeMat/toolbox/funfun/ode45.m | 9,430 | utf_8 | 5c8323aeb3542e75ee68970d98ab8d28 | % DOCBLOCK num_ode45
function varargout = ode45(f,tspan,y0,options,varargin)
if(nargin<4) options={}; end
abstol=generic_get(options,'AbsTol',1e-6);
reltol=generic_get(options,'RelTol',1e-3);
maxstep=generic_get(options,'MaxStep',(tspan(2)-tspan(1))/10);
h=generic_get(options,'InitialStep',maxstep/100);
stepper=generic... |
github | aristofanio/freemat-master | license.m | .m | freemat-master/FreeMat/toolbox/general/license.m | 40,790 | utf_8 | 5d3028e5c777ce7e581cf74a6230451b | % GNU GENERAL PUBLIC LICENSE
% Version 2, June 1991
%
% Copyright (C) 1989, 1991 Free Software Foundation, Inc.
% 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
% Everyone is permitted to copy and distribute verbatim copies
% of this license document, but changing it is not allowed.
%
% ... |
github | aristofanio/freemat-master | diff.m | .m | freemat-master/FreeMat/toolbox/general/diff.m | 2,734 | utf_8 | 8b7f4dd87db51c4f217a95788ba2aac2 | % DOCBLOCK elementary_diff
% Copyright (C) 1995, 1996, 1999, 2000, 2002, 2004, 2005, 2006, 2007
% Kurt Hornik
%%
%% Copyright (C) 2008 Samit Basu, Eugene Ingerman
%%
%% This file is adopted in FreeMat from Octave under the conditions of the GNU
%% General Public License
%
%
% Octave is free software; yo... |
github | aristofanio/freemat-master | mkdir.m | .m | freemat-master/FreeMat/toolbox/os/mkdir.m | 260 | utf_8 | a0ee74e8949351ea029727f417872c4b | % DOCBLOCK os_mkdir
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function status = mkdir(parentdir,dirname)
if (~exist('dirname'))
status = mkdir_core(parentdir);
else
status = mkdir_core([parentdir dirsep dirname]);
end
|
github | aristofanio/freemat-master | fliplr.m | .m | freemat-master/FreeMat/toolbox/array/fliplr.m | 130 | utf_8 | 9d90565d04ee2b87baafb02ae82c990e | % DOCBLOCK array_fliplr
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function x = fliplr(y)
x = flipdim(y,2);
|
github | aristofanio/freemat-master | ishandle.m | .m | freemat-master/FreeMat/toolbox/array/ishandle.m | 482 | utf_8 | f9ef4d00cd109bdd7747a328c034f967 | % DOCBLOCK inspection_ishandle
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function b = ishandle(handle,type)
if (isstr(handle))
b = false;
return;
end
if (strcmp(type,'figure') && (handle<=100))
b = logical(1);
return;
end
if ((handle<=100000) || (han... |
github | aristofanio/freemat-master | circshift.m | .m | freemat-master/FreeMat/toolbox/array/circshift.m | 413 | utf_8 | 036a38f04960102bb85fb6acfa46f13b | % DOCBLOCK array_circshift
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function x = circshift(y,shiftvec)
szey = size(y);
ndim = prod(size(szey));
shiftvec = shiftvec(:);
shiftlen = prod(size(shiftvec));
d = {};
for k=1:ndim
if (k<=shiftlen)
shift = shiftvec(k);
else
s... |
github | aristofanio/freemat-master | issquare.m | .m | freemat-master/FreeMat/toolbox/array/issquare.m | 198 | utf_8 | 52c4aa8fca66c4230d24eb61fcb91ded | % DOCBLOCK inspection_issquare
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function y = issquare(x)
s = size(x);
y = isempty(x) || (( s(1) == s(2) ) && ismatrix( x ));
|
github | aristofanio/freemat-master | isscalar.m | .m | freemat-master/FreeMat/toolbox/array/isscalar.m | 154 | utf_8 | 0d03db62e8fdb43a34ec3efdb874e0fb | % DOCBLOCK inspection_isscalar
% M version contributor: M.W. Vogel 01-22-06
% Licensed under the GPL
function v = isscalar(a)
v = (numel(a) == 1);
|
github | aristofanio/freemat-master | iscellstr.m | .m | freemat-master/FreeMat/toolbox/array/iscellstr.m | 367 | utf_8 | 3d47c22911367b13931a08a86e1e35bf | % DOCBLOCK inspection_iscellstr
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function x = iscellstr(y)
if (~iscell(y))
x = logical(0);
return;
end
m = numel(y);
all_strings = logical(1);
i = 1;
while (all_strings & (i <= m))
all_strings = all_strings & (isstr(y{i}) | isempty(y... |
github | aristofanio/freemat-master | sub2ind.m | .m | freemat-master/FreeMat/toolbox/array/sub2ind.m | 1,134 | utf_8 | 026a11f2c289631487c4fb2908e739b9 | % DOCBLOCK elementary_sub2ind
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function n = sub2ind(sizevec,varargin)
if (length(varargin) == 0)
n = [];
return;
end
% Make sure sizevec is large enough
sizevec = sizevec(:)';
if (length(sizevec) < length(varargin))
sizevec = [sizevec,... |
github | aristofanio/freemat-master | all.m | .m | freemat-master/FreeMat/toolbox/array/all.m | 564 | utf_8 | 44d4c74fa02857327a10fc2668841d63 | % DOCBLOCK elementary_all
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function y = all(A,dim)
if (nargin == 0)
error 'all function requires at least one argument'
end
if (nargin == 1)
if ~isempty(A)
y = min(logical(A));
else
if (ndims(A) < 3)
y = true;
e... |
github | aristofanio/freemat-master | isdigit.m | .m | freemat-master/FreeMat/toolbox/array/isdigit.m | 172 | utf_8 | 6e5b6e3196e5ab3a9ac07c84aaabd4a4 | % DOCBLOCK string_isdigit
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function x = isdigit(s)
s = int32(string(s));
x = ((s >=48 ) & (s <= 57));
|
github | aristofanio/freemat-master | islogical.m | .m | freemat-master/FreeMat/toolbox/array/islogical.m | 146 | utf_8 | 41f2dc5233a6a538f3a256e64f01ebdb | % DOCBLOCK inspection_islogical
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function x = islogical(y)
x = isa(y,'logical');
|
github | aristofanio/freemat-master | deal.m | .m | freemat-master/FreeMat/toolbox/array/deal.m | 349 | utf_8 | ca8555c45114c6ad09275fe0eb290940 | % DOCBLOCK elementary_deal
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function varargout = deal(varargin)
if (nargin ~= nargout) && (nargin ~= 1)
error('number of outputs must match number of inputs');
end
if (nargin == 1)
varargout = varargin(ones(1,max(1,nargout)));
else
varar... |
github | aristofanio/freemat-master | isa.m | .m | freemat-master/FreeMat/toolbox/array/isa.m | 238 | utf_8 | ba31c06f87e73bc3cc0ec6d909baaf67 | % DOCBLOCK inspection_isa
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function y = isa(x,type)
if (~strcmp(typeof(type),'char'))
error('type argument to isa must be a string');
end
y = strcmp(class(x),type);
|
github | aristofanio/freemat-master | isnumeric.m | .m | freemat-master/FreeMat/toolbox/array/isnumeric.m | 237 | utf_8 | b209cfc56998f786bb08b8a9241ef03b | % DOCBLOCK inspection_isnumeric
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function x = isnumeric(y)
x = any(strcmp({'uint8','int8','uint16','int16','uint32','int32','uint64','int64','single','double'},class(y)));
|
github | aristofanio/freemat-master | isstr.m | .m | freemat-master/FreeMat/toolbox/array/isstr.m | 136 | utf_8 | a79fa777fa589c5fb83b587c1b72e665 | % DOCBLOCK inspection_isstr
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function x = isstr(y)
x = isa(y,'char');
|
github | aristofanio/freemat-master | ischar.m | .m | freemat-master/FreeMat/toolbox/array/ischar.m | 138 | utf_8 | a95f591a194ff9b3cde6ccd8bba3a028 | % DOCBLOCK inspection_ischar
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function x = ischar(y)
x = isa(y,'char');
|
github | aristofanio/freemat-master | isfloat.m | .m | freemat-master/FreeMat/toolbox/array/isfloat.m | 168 | utf_8 | 5aac73b3e44c256b97f6115aa992efa1 | % DOCBLOCK array_isfloat
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function x = isfloat(y)
x = any(strcmp({'single','double'},class(y)));
|
github | aristofanio/freemat-master | flipud.m | .m | freemat-master/FreeMat/toolbox/array/flipud.m | 131 | utf_8 | 0e19b0d0d484b2f9edb6f0d5d634516d | % DOCBLOCK array_flipud
% Copyright (c) 2002, 2003 Samit Basu
% Licensed under the GPL
function x = flipud(y)
x = flipdim(y,1);
|
github | aristofanio/freemat-master | isstruct.m | .m | freemat-master/FreeMat/toolbox/array/isstruct.m | 151 | utf_8 | 899cc47c00cf41ef89a0a1d5e4e24ccb | % DOCBLOCK inspection_isstruct
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function x = isstruct(y)
x = isa(y,'struct');
|
github | aristofanio/freemat-master | shiftdim.m | .m | freemat-master/FreeMat/toolbox/array/shiftdim.m | 1,261 | utf_8 | 9b831f07a2bba394bf5f6fc65f8b2a15 | % DOCBLOCK array_shiftdim
% Copyright (c) 2007 Samit Basu
% Licensed under the GPL
function [y,n] = shiftdim(x,p)
% Compute the size of x
xsize = size(x);
if (nargin == 1)
% Find the first non-singular dimension of x
p = find(xsize ~= 1,1,'first')-1;
end
if (isempty(p) || (p==0))
%... |
github | aristofanio/freemat-master | vec.m | .m | freemat-master/FreeMat/toolbox/array/vec.m | 124 | utf_8 | a3fa7d2bc58a7a3e2fc6485e426dd906 | % DOCBLOCK elementary_vec
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function y = vec(x)
y = x(:);
|
github | aristofanio/freemat-master | char.m | .m | freemat-master/FreeMat/toolbox/array/char.m | 671 | utf_8 | 80cdf3e62c8765c3573435adc925e386 | % DOCBLOCK typecast_char
% Copyright (c) 2002-2007 Samit Basu
% Licensed under the GPL
function y = char(varargin)
if ((nargin == 1) && ~iscell(varargin{1}))
y = string(varargin{1});
elseif ((nargin == 1))
y = char_block(varargin{1});
else
y = char_block(varargin);
end
function y = char_bl... |
github | aristofanio/freemat-master | numel.m | .m | freemat-master/FreeMat/toolbox/array/numel.m | 252 | utf_8 | c04d964c91643cb58f83a6c793738fb6 | % DOCBLOCK inspection_numel
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function len = numel(x,varargin)
if (nargin==1)
len = prod(size(x));
else
len = 1;
for k=1:length(varargin)
len = len * numel(varargin{k});
end
end
|
github | aristofanio/freemat-master | nnz.m | .m | freemat-master/FreeMat/toolbox/array/nnz.m | 79 | utf_8 | 04a140397cfddcf01919fc4effe4c4ee | % DOCBLOCK inspection_nnz
function y = nnz(x)
p = find(x);
y = numel(p);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.