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