1 ## Copyright (C) 2010-2012 John W. Eaton
2 ## Copyright (C) 2010 VZLU Prague
4 ## This file is part of Octave.
6 ## Octave is free software; you can redistribute it and/or modify it
7 ## under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 3 of the License, or (at
9 ## your option) any later version.
11 ## Octave is distributed in the hope that it will be useful, but
12 ## WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ## General Public License for more details.
16 ## You should have received a copy of the GNU General Public License
17 ## along with Octave; see the file COPYING. If not, see
18 ## <http://www.gnu.org/licenses/>.
21 ## @deftypefn {Function File} {} unimplemented ()
22 ## Undocumented internal function.
25 function txt = unimplemented (fcn)
27 is_matlab_function = true;
29 ## Some smarter cases, add more as needed.
33 txt = ["importdata is not implemented. Similar functionality is ",...
34 "available through @code{load}, @code{dlmread}, @code{csvread}, ",...
35 "or @code{textscan}."];
38 txt = ["quad2d is not implemented. Consider using dblquad."];
41 txt = ["gsvd is not currently part of core Octave. See the ",
42 "linear-algebra package at @url{http://octave.sf.net/linear-algebra/}."];
45 txt = ["Octave does not currently provide linprog. ",...
46 "Linear programming problems may be solved using @code{glpk}. ",...
47 "Try @code{help glpk} for more info."];
49 case {"ode113", "ode15i", "ode15s", "ode23", "ode23s", "ode23t", "ode45", "odeget", "odeset"}
50 txt = ["Octave provides lsode for solving differential equations. ",...
51 "For more information try @code{help lsode}. ",...
52 "Matlab-compatible ODE functions are provided by the odepkg package. ",...
53 "See @url{http://octave.sf.net/odepkg/}."];
56 if (ismember (fcn, missing_functions ()))
57 txt = sprintf ("the `%s' function is not yet implemented in Octave", fcn);
59 is_matlab_function = false;
64 if (is_matlab_function)
65 txt = [txt, "\n\n@noindent\nPlease read ",...
66 "@url{http://www.octave.org/missing.html} to learn how ",...
67 "you can contribute missing functionality."];
68 txt = __makeinfo__ (txt);
72 warning ("Octave:missing-function", "%s", txt);
77 function list = missing_functions ()
148 "createClassFromWsdl",
399 "validateattributes",
428 %! str = unimplemented ("no_name_function");
429 %! assert (isempty (str));
430 %! str = unimplemented ("quad2d");
431 %! assert (str(1:51), "quad2d is not implemented. Consider using dblquad.");
432 %! str = unimplemented ("MException");
433 %! assert (str(1:58), "the `MException' function is not yet implemented in Octave");