/usr/share/octave/packages/missing-functions-1.0.2/missingmatlabfunctions.m is in octave-missing-functions 1.0.2-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | ## Copyright (C) 2008 Bill Denney
##
## This software is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or (at
## your option) any later version.
##
## This software is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this software; see the file COPYING. If not, see
## <http://www.gnu.org/licenses/>.
## -*- texinfo -*-
## @deftypefn {Function File} {} matlabfunctionlist (@var{outfile}, @var{outformat}, @var{url})
## Show or write to @var{outfile} the missing Matlab functions listed at
## the category index @var{url}. @var{outformat} is the output format
## to show or write and it may be one of "wiki" (default) or "html".
## @seealso{missingfunctionstatus}
## @end deftypefn
function missingmatlabfunctions (outfile = "", outformat = "", url = "http://www.mathworks.com/access/helpdesk/help/techdoc/ref/f16-6011.html")
[funlist, funloc, catlist, catloc, catlvl] = __matlabfunctionlist__ (url);
funstat = __functionstatus__ (funlist);
## guess the output format defaulting to wiki.
if isempty (outformat)
if isempty (outfile)
outformat = "wiki";
else
[dirname, filename, ext] = fileparts (outfile);
if (! isempty (findstr (ext, "htm")))
outformat = "html";
else
outformat = "wiki";
endif
endif
endif
output = __missingmatlab2txt__ (funlist, funloc, funstat,
catlist, catloc, catlvl, outformat);
if isempty (outfile)
printf ("%s", output{:});
else
[fid msg] = fopen (outfile, "wt");
if (fid < 0)
error ("missingmatlabfunctions: error opening %s, %s", outfile, msg);
endif
fprintf (fid, "%s", output{:});
fclose (fid);
endif
endfunction
|