]> Creatis software - CreaPhase.git/blob - octave_packages/m/help/unimplemented.m
update packages
[CreaPhase.git] / octave_packages / m / help / unimplemented.m
1 ## Copyright (C) 2010-2012 John W. Eaton
2 ## Copyright (C) 2010 VZLU Prague
3 ##
4 ## This file is part of Octave.
5 ##
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.
10 ##
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.
15 ##
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/>.
19
20 ## -*- texinfo -*-
21 ## @deftypefn {Function File} {} unimplemented ()
22 ## Undocumented internal function.
23 ## @end deftypefn
24
25 function txt = unimplemented (fcn)
26
27   is_matlab_function = true;
28
29   ## Some smarter cases, add more as needed.
30   switch (fcn)
31
32   case "importdata"
33     txt = ["importdata is not implemented.  Similar functionality is ",...
34     "available through @code{load}, @code{dlmread}, @code{csvread}, ",...
35     "or @code{textscan}."];  
36
37   case "quad2d"
38     txt = ["quad2d is not implemented.  Consider using dblquad."];
39
40   case "gsvd"
41     txt = ["gsvd is not currently part of core Octave.  See the ",
42     "linear-algebra package at @url{http://octave.sf.net/linear-algebra/}."];
43
44   case "linprog"
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."];
48
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/}."];
54
55   otherwise
56     if (ismember (fcn, missing_functions ()))
57       txt = sprintf ("the `%s' function is not yet implemented in Octave", fcn);
58     else
59       is_matlab_function = false;
60       txt = "";
61     endif
62   endswitch
63
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);
69   endif
70
71   if (nargout == 0)
72     warning ("Octave:missing-function", "%s", txt);
73   endif
74
75 endfunction
76
77 function list = missing_functions ()
78   persistent list = {
79   "DelaunayTri",
80   "MException",
81   "RandStream",
82   "TriRep",
83   "TriScatteredInterp",
84   "align",
85   "alim",
86   "alpha",
87   "alphamap",
88   "annotation",
89   "audiodevinfo",
90   "audioplayer",
91   "audiorecorder",
92   "aufinfo",
93   "auread",
94   "auwrite",
95   "avifile",
96   "aviinfo",
97   "aviread",
98   "bar3",
99   "bar3h",
100   "bench",
101   "betaincinv",
102   "bicgstabl",
103   "brush",
104   "builddocsearchdb",
105   "bvp4c",
106   "bvp5c",
107   "bvpget",
108   "bvpinit",
109   "bvpset",
110   "bvpxtend",
111   "callSoapService",
112   "calllib",
113   "camdolly",
114   "cameratoolbar",
115   "camlight",
116   "camlookat",
117   "camorbit",
118   "campan",
119   "campos",
120   "camproj",
121   "camroll",
122   "camtarget",
123   "camup",
124   "camva",
125   "camzoom",
126   "cdf2rdf",
127   "cdfepoch",
128   "cdfinfo",
129   "cdfread",
130   "cdfwrite",
131   "cellplot",
132   "checkin",
133   "checkout",
134   "cholinc",
135   "clearvars",
136   "clipboard",
137   "cmopts",
138   "cmpermute",
139   "cmunique",
140   "colordef",
141   "colormapeditor",
142   "commandhistory",
143   "commandwindow",
144   "condeig",
145   "coneplot",
146   "contourslice",
147   "copyobj",
148   "createClassFromWsdl",
149   "createSoapMessage",
150   "customverctrl",
151   "daqread",
152   "datacursormode",
153   "datatipinfo",
154   "dbmex",
155   "dde23",
156   "ddeget",
157   "ddesd",
158   "ddeset",
159   "decic",
160   "depdir",
161   "depfun",
162   "deval",
163   "dialog",
164   "dither",
165   "docopt",
166   "docsearch",
167   "dragrect",
168   "dynamicprops",
169   "echodemo",
170   "ellipj",
171   "ellipke",
172   "erfcinv",
173   "errordlg",
174   "evalc",
175   "exifread",
176   "expint",
177   "export2wsdlg",
178   "figurepalette",
179   "filebrowser",
180   "fill3",
181   "findfigs",
182   "fitsinfo",
183   "fitsread",
184   "flow",
185   "fminsearch",
186   "frame2im",
187   "freqspace",
188   "funm",
189   "gallery",
190   "gammaincinv",
191   "gco",
192   "getframe",
193   "getpixelposition",
194   "gmres",
195   "grabcode",
196   "graymon",
197   "gsvd",
198   "guidata",
199   "guide",
200   "guihandles",
201   "handle",
202   "hdf",
203   "hdf5",
204   "hdf5info",
205   "hdf5read",
206   "hdf5write",
207   "hdfinfo",
208   "hdfread",
209   "hdftool",
210   "helpbrowser",
211   "helpdesk",
212   "helpdlg",
213   "helpwin",
214   "hgexport",
215   "hgload",
216   "hgsave",
217   "hgsetget",
218   "hgtransform",
219   "hostid",
220   "ilu",
221   "im2frame",
222   "im2java",
223   "imapprox",
224   "imformats",
225   "import",
226   "importdata",
227   "inmem",
228   "inputParser",
229   "inputdlg",
230   "inspect",
231   "instrfind",
232   "instrfindall",
233   "interpstreamspeed",
234   "iscom",
235   "isinterface",
236   "isjava",
237   "isocaps",
238   "isstudent",
239   "javaArray",
240   "javaMethod",
241   "javaMethodEDT",
242   "javaObject",
243   "javaObjectEDT",
244   "javaaddpath",
245   "javachk",
246   "javaclasspath",
247   "javarmpath",
248   "ldl",
249   "libfunctions",
250   "libfunctionsview",
251   "libisloaded",
252   "libpointer",
253   "libstruct",
254   "light",
255   "lightangle",
256   "lighting",
257   "linkaxes",
258   "linkdata",
259   "linsolve",
260   "listdlg",
261   "listfonts",
262   "loadlibrary",
263   "lscov",
264   "lsqr",
265   "makehgtform",
266   "material",
267   "matlabrc",
268   "maxNumCompThreads",
269   "memmapfile",
270   "memory",
271   "metaclass",
272   "methodsview",
273   "minres",
274   "mlint",
275   "mlintrpt",
276   "mmfileinfo",
277   "mmreader",
278   "movegui",
279   "movie",
280   "movie2avi",
281   "msgbox",
282   "multibandread",
283   "multibandwrite",
284   "native2unicode",
285   "noanimate",
286   "ode113",
287   "ode15i",
288   "ode15s",
289   "ode23",
290   "ode23s",
291   "ode23t",
292   "ode23tb",
293   "ode45",
294   "odefile",
295   "odeget",
296   "odeset",
297   "odextend",
298   "open",
299   "openfig",
300   "opengl",
301   "openvar",
302   "ordeig",
303   "ordqz",
304   "ordschur",
305   "padecoef",
306   "pagesetupdlg",
307   "pan",
308   "parseSoapResponse",
309   "path2rc",
310   "pathtool",
311   "pcode",
312   "pdepe",
313   "pdeval",
314   "playshow",
315   "plotbrowser",
316   "plotedit",
317   "plottools",
318   "polyeig",
319   "prefdir",
320   "preferences",
321   "printdlg",
322   "printopt",
323   "printpreview",
324   "profile",
325   "profsave",
326   "propedit",
327   "propertyeditor",
328   "publish",
329   "qmr",
330   "quad2d",
331   "questdlg",
332   "rbbox",
333   "reducepatch",
334   "reducevolume",
335   "resample",
336   "rgbplot",
337   "root",
338   "rotate",
339   "rotate3d",
340   "selectmoveresize",
341   "sendmail",
342   "serial",
343   "setpixelposition",
344   "showplottool",
345   "shrinkfaces",
346   "smooth3",
347   "snapnow",
348   "sound",
349   "soundsc",
350   "ss2tf",
351   "stream2",
352   "stream3",
353   "streamline",
354   "streamparticles",
355   "streamribbon",
356   "streamslice",
357   "streamtube",
358   "strings",
359   "subvolume",
360   "superclasses",
361   "support",
362   "surf2patch",
363   "symmlq",
364   "syntax",
365   "tetramesh",
366   "texlabel",
367   "textwrap",
368   "tfqmr",
369   "timer",
370   "timerfind",
371   "timerfindall",
372   "timeseries",
373   "toolboxdir",
374   "tscollection",
375   "tstool",
376   "uibuttongroup",
377   "uicontextmenu",
378   "uicontrol",
379   "uigetpref",
380   "uiimport",
381   "uiopen",
382   "uipanel",
383   "uipushtool",
384   "uiresume",
385   "uisave",
386   "uisetcolor",
387   "uisetfont",
388   "uisetpref",
389   "uistack",
390   "uitable",
391   "uitoggletool",
392   "uitoolbar",
393   "uiwait",
394   "undocheckout",
395   "unicode2native",
396   "unloadlibrary",
397   "unmesh",
398   "userpath",
399   "validateattributes",
400   "verLessThan",
401   "viewmtx",
402   "visdiff",
403   "volumebounds",
404   "waitfor",
405   "warndlg",
406   "waterfall",
407   "wavfinfo",
408   "wavplay",
409   "wavrecord",
410   "web",
411   "whatsnew",
412   "wk1finfo",
413   "wk1read",
414   "wk1write",
415   "workspace",
416   "xlsfinfo",
417   "xlsread",
418   "xlswrite",
419   "xmlread",
420   "xmlwrite",
421   "xslt",
422   "zoom",
423   };
424 endfunction
425
426
427 %!test
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");
434
435