├── test ├── publish │ ├── test_script_empty.m │ ├── test_script_head_only.m │ ├── module.mk │ ├── test_script_example.m │ └── test_script_code_only.m ├── bug-38236 │ ├── df_vr.m │ ├── module.mk │ └── u_vr.m ├── bug-53027 │ ├── globals53027.m │ ├── gtest53027.m │ ├── module.mk │ ├── ntest53027a.m │ ├── ntest53027b.m │ └── ntest53027c.m ├── bug-52722 │ ├── define_globals.m │ ├── bug-52722.tst │ ├── module.mk │ └── include_globals.m ├── private-functions │ ├── private │ │ ├── bscript.m │ │ ├── ascript.m │ │ ├── pfcn2.m │ │ └── pfcn1.m │ ├── private-functions.tst │ ├── fcn.m │ └── module.mk ├── nest │ ├── script_nest_script.m │ ├── arg_ret.m │ ├── arg_nest.m │ ├── nest_eval.m │ ├── persistent_nest.m │ ├── counter.m │ ├── nst1.m │ ├── script_nest.m │ ├── nst3.m │ ├── recursive_nest3.m │ ├── nst2.m │ ├── varg_nest.m │ ├── varg_nest2.m │ ├── scope0.m │ ├── scope2.m │ ├── recursive_nest.m │ ├── scope3.m │ ├── scope1.m │ ├── recursive_nest2.m │ ├── no_closure.m │ └── module.mk ├── classdef-multiple-inheritance │ ├── base_1.m │ ├── base_2.m │ ├── child_from_base_1.m │ ├── child_from_base_1_and_2.m │ └── module.mk ├── bug-35448 │ ├── fB.m │ ├── fC.m │ ├── module.mk │ └── fA.m ├── fcn-handle │ ├── f1.m │ ├── +pkga │ │ └── +pkgb │ │ │ ├── f1.m │ │ │ ├── f2.m │ │ │ ├── bug51709_a.m │ │ │ └── bug51709_b.m │ ├── @fhdr_parent │ │ ├── numel.m │ │ └── fhdr_parent.m │ ├── @fhdr_other │ │ ├── getsize_cellfun.m │ │ ├── fhdr_other.m │ │ ├── getsize_arrayfun.m │ │ └── getsize_loop.m │ ├── @fhdr_derived │ │ └── fhdr_derived.m │ ├── bug51709_a.m │ ├── bug51709_c.m │ └── module.mk ├── classes │ ├── @Snork │ │ ├── uplus.m │ │ ├── cack.m │ │ ├── double.m │ │ ├── ne.m │ │ ├── tattack.m │ │ ├── private │ │ │ └── myStash.m │ │ ├── subsindex.m │ │ ├── getStash.m │ │ ├── saveobj.m │ │ ├── uminus.m │ │ ├── loadobj.m │ │ ├── display.m │ │ ├── eq.m │ │ ├── ge.m │ │ ├── gt.m │ │ ├── le.m │ │ ├── lt.m │ │ ├── minus.m │ │ ├── plus.m │ │ ├── horzcat.m │ │ ├── ldivide.m │ │ ├── mldivide.m │ │ ├── mrdivide.m │ │ ├── mtimes.m │ │ ├── rdivide.m │ │ ├── times.m │ │ ├── vertcat.m │ │ ├── ctranspose.m │ │ ├── transpose.m │ │ ├── gick.m │ │ ├── power.m │ │ ├── end.m │ │ ├── mpower.m │ │ ├── get.m │ │ ├── Snork.m │ │ ├── set.m │ │ └── subsref.m │ ├── @Dork │ │ ├── bling.m │ │ ├── private │ │ │ └── myStash.m │ │ ├── getStash.m │ │ ├── gack.m │ │ ├── get.m │ │ ├── display.m │ │ ├── Dork.m │ │ └── set.m │ ├── @Pork │ │ ├── bling.m │ │ ├── private │ │ │ └── myStash.m │ │ ├── gurk.m │ │ ├── get.m │ │ ├── display.m │ │ ├── set.m │ │ └── Pork.m │ ├── @Spork │ │ ├── cack.m │ │ ├── private │ │ │ └── myStash.m │ │ ├── getStash.m │ │ ├── saveobj.m │ │ ├── display.m │ │ ├── loadobj.m │ │ ├── geek.m │ │ ├── get.m │ │ ├── Spork.m │ │ └── set.m │ ├── @SizeTester │ │ ├── size.m │ │ ├── numel.m │ │ └── SizeTester.m │ ├── @CPrecedenceTester1 │ │ ├── double.m │ │ ├── plus.m │ │ ├── tattack.m │ │ └── CPrecedenceTester1.m │ ├── @CPrecedenceTester2 │ │ ├── double.m │ │ ├── plus.m │ │ ├── tattack.m │ │ └── CPrecedenceTester2.m │ ├── @CPrecedenceTester3 │ │ ├── double.m │ │ ├── plus.m │ │ ├── tattack.m │ │ └── CPrecedenceTester3.m │ ├── @Blork │ │ ├── display.m │ │ ├── bleek.m │ │ ├── get.m │ │ ├── Blork.m │ │ └── set.m │ ├── @Cork │ │ ├── display.m │ │ ├── click.m │ │ ├── get.m │ │ ├── Cork.m │ │ └── set.m │ ├── @Gork │ │ ├── cork.m │ │ ├── gark.m │ │ ├── subsref.m │ │ ├── subsasgn.m │ │ ├── Gork.m │ │ ├── display.m │ │ ├── get.m │ │ └── set.m │ └── @Sneetch │ │ ├── display.m │ │ └── Sneetch.m ├── bug-51532 │ ├── +package_bug51532 │ │ └── foo.m │ └── module.mk ├── classdef │ ├── plist_t1.m │ ├── plist_t2.m │ ├── plist_t3.m │ ├── class_bug52614A.m │ ├── class_bug52614B.m │ ├── foo_method_changes_property_size.m │ ├── class_bug55766.m │ ├── module.mk │ ├── foo_value_class.m │ └── foo_static_method_constant_property.m ├── bug-53468 │ ├── ofig403.ofig │ ├── ofig421.ofig │ ├── ofig51.ofig │ └── module.mk ├── class-concat │ ├── @foo │ │ └── foo.m │ └── module.mk ├── bug-38691 │ ├── dir2 │ │ ├── func3.m │ │ ├── func2.m │ │ └── func1.m │ ├── module.mk │ └── dir1 │ │ └── func1.m ├── bug-50035 │ ├── @bug50035 │ │ ├── bug50035.m │ │ └── display.m │ └── module.mk ├── bug-36025 │ ├── @testclass │ │ ├── one.m │ │ ├── two.m │ │ └── testclass.m │ └── module.mk ├── pkg │ ├── mfile_basic_test │ │ ├── INDEX │ │ ├── NEWS │ │ └── DESCRIPTION │ ├── mfile_minimal_test │ │ └── DESCRIPTION │ └── module.mk ├── bug-46660 │ ├── class_bug46660.m │ └── module.mk ├── bug-54995 │ ├── @testclass54995 │ │ ├── subsref.m │ │ └── testclass54995.m │ └── module.mk ├── bug-44940 │ ├── class_bug44940.m │ └── module.mk ├── bug-50831 │ ├── module.mk │ └── bug-50831.tst ├── bug-53956 │ ├── bug53956_class_3.m │ ├── module.mk │ ├── bug53956_class_2.m │ ├── bug53956_class_4.m │ └── bug-53956.tst ├── ctor-vs-method │ ├── @other │ │ ├── parent.m │ │ └── other.m │ ├── @parent │ │ ├── method.m │ │ └── parent.m │ ├── @derived │ │ ├── derived.m │ │ └── parent.m │ ├── module.mk │ └── __trace__.m ├── bug-35881 │ └── module.mk ├── bug-45351 │ ├── module.mk │ ├── bug-45351.tst │ └── bug45351.m ├── bug-50716 │ ├── module.mk │ └── myclass.m ├── bug-41723 │ ├── module.mk │ └── class_bug41723.m ├── bug-49379 │ ├── module.mk │ ├── bug-49379.tst │ └── class_bug49379.m ├── bug-51192 │ ├── module.mk │ └── class_bug51192.m ├── bug-51599 │ ├── module.mk │ └── class_bug51599.m ├── bug-52075 │ ├── module.mk │ └── class_bug52075.m ├── bug-55758 │ ├── module.mk │ ├── class_bug_55758.m │ └── bug-55758.tst ├── local-functions │ ├── module.mk │ └── local_function_eval.m ├── bug-47680 │ ├── module.mk │ ├── bug-47680.tst │ ├── super_bug47680.m │ └── sub_bug47680.m ├── bug-51534 │ ├── module.mk │ ├── child_bug51534.m │ └── parent_bug51534.m ├── bug-50014 │ ├── duplicate_primary_subfunction.m │ ├── duplicate_nested_parent_function.m │ ├── duplicate_parent_nested_function.m │ ├── duplicate_primary_nested_function.m │ ├── duplicate_subfunction_old_syntax.m │ ├── duplicate_subfunction.m │ ├── duplicate_nested_function.m │ ├── duplicate_primary_subfunction_old_syntax.m │ ├── duplicate_parent_nested2.m │ ├── duplicate_nested_in_subfunction_ok.m │ ├── duplicate_subfunction_separate_scope_ok.m │ └── module.mk ├── mex │ ├── bug_51725.c │ ├── mexnumtst.tst │ └── bug_54096.c ├── bug-54490.tst ├── bug-53599.tst ├── bug-53579.tst ├── bug-49904.tst ├── mk_bc_overloads_expected.m └── bug-45972.tst ├── libgui ├── gui.pro ├── qterminal │ ├── qterminal.pro │ ├── qterminal │ │ ├── README │ │ └── qterminal.pro │ ├── msvc.pri │ └── libqterminal │ │ ├── README │ │ └── unix │ │ └── konsole_wcwidth.h └── src │ └── icons │ ├── logo.png │ ├── bp-next.png │ ├── bp-prev.png │ ├── circle.png │ ├── cross.png │ ├── db-cont.png │ ├── db-step.png │ ├── db-stop.png │ ├── fleur.png │ ├── folder.png │ ├── go-down.png │ ├── go-home.png │ ├── go-last.png │ ├── go-next.png │ ├── go-up.png │ ├── hand2.png │ ├── zoom-in.png │ ├── bp-rm-all.png │ ├── bp-toggle.png │ ├── edit-copy.png │ ├── edit-cut.png │ ├── edit-find.png │ ├── edit-redo.png │ ├── edit-undo.png │ ├── go-first.png │ ├── left_side.png │ ├── top_side.png │ ├── user-home.png │ ├── zoom-out.png │ ├── bottom_side.png │ ├── db-step-in.png │ ├── db-step-out.png │ ├── dialog-error.png │ ├── document-new.png │ ├── edit-delete.png │ ├── edit-paste.png │ ├── figure-axes.png │ ├── figure-grid.png │ ├── figure-pan.png │ ├── figure-text.png │ ├── folder-new.png │ ├── go-previous.png │ ├── right_side.png │ ├── system-run.png │ ├── view-refresh.png │ ├── widget-close.png │ ├── widget-dock.png │ ├── dialog-warning.png │ ├── document-open.png │ ├── document-print.png │ ├── document-save.png │ ├── figure-rotate.png │ ├── figure-zoom-in.png │ ├── plot-xy-curve.png │ ├── widget-undock.png │ ├── zoom-original.png │ ├── document-save-as.png │ ├── edit-find-replace.png │ ├── figure-zoom-out.png │ ├── top_left_corner.png │ ├── top_right_corner.png │ ├── widget-dock-light.png │ ├── applications-system.png │ ├── bottom_left_corner.png │ ├── bottom_right_corner.png │ ├── dialog-information.png │ ├── preferences-system.png │ ├── widget-close-light.png │ ├── widget-undock-light.png │ ├── figure-zoom-original.png │ ├── letter_logo_FileEditor.png │ ├── graphic_logo_FileEditor.png │ ├── graphic_logo_NewsDockWidget.png │ ├── graphic_logo_ReleaseWidget.png │ ├── graphic_logo_VariableEditor.png │ ├── graphic_logo_WorkspaceView.png │ ├── letter_logo_FilesDockWidget.png │ ├── letter_logo_NewsDockWidget.png │ ├── letter_logo_ReleaseWidget.png │ ├── letter_logo_VariableEditor.png │ ├── letter_logo_WorkspaceView.png │ ├── graphic_logo_FilesDockWidget.png │ ├── letter_logo_HistoryDockWidget.png │ ├── graphic_logo_HistoryDockWidget.png │ ├── graphic_logo_TerminalDockWidget.png │ ├── letter_logo_TerminalDockWidget.png │ ├── graphic_logo_DocumentationDockWidget.png │ └── letter_logo_DocumentationDockWidget.png ├── etc ├── fonts │ ├── FreeSans.otf │ ├── FreeSansBold.otf │ ├── FreeSansOblique.otf │ └── FreeSansBoldOblique.otf ├── icons │ ├── octave-sombrero.png │ └── org.octave.Octave.desktop.in ├── PROJECTS ├── CHECKLIST └── RELEASE.BUG_FIX_LIST ├── examples └── code │ ├── @polynomial │ ├── double.m │ ├── roots.m │ ├── numel.m │ ├── mtimes.m │ ├── end.m │ ├── polyval.m │ ├── plot.m │ ├── get.m │ ├── set.m │ ├── disp.m │ ├── polynomial.m │ ├── polynomial_superiorto.m │ └── subsasgn.m │ ├── @FIRfilter │ ├── display.m │ ├── subsasgn.m │ ├── subsref.m │ ├── FIRfilter.m │ └── FIRfilter_aggregation.m │ ├── COPYING │ ├── addtwomatrices.cc │ ├── myfunc.c │ ├── myhello.c │ ├── standalone.cc │ ├── mycell.c │ ├── helloworld.cc │ ├── oregonator.m │ ├── celldemo.cc │ ├── globaldemo.cc │ ├── fortransub.f │ ├── fortrandemo.cc │ ├── oregonator.cc │ ├── funcdemo.cc │ ├── mystring.c │ ├── stringdemo.cc │ ├── myprop.c │ ├── myfeval.c │ ├── standalonebuiltin.cc │ ├── structdemo.cc │ ├── myfevalf.f │ ├── paramdemo.cc │ └── unwinddemo.cc ├── scripts ├── image │ └── default.img ├── profiler │ ├── html │ │ ├── flat_entry.html │ │ ├── hierarchical_entry.html │ │ ├── flat.html │ │ ├── hierarchical.html │ │ ├── function.html │ │ └── style.css │ └── module.mk ├── startup │ └── site-rcfile ├── +containers │ └── module.mk ├── deprecated │ └── module.mk ├── +matlab │ └── +lang │ │ └── module.mk ├── testfun │ └── private │ │ └── html_plot_demos_template.html ├── web │ └── module.mk ├── @ftp │ └── module.mk ├── io │ └── module.mk ├── legacy │ └── module.mk ├── special-matrix │ └── module.mk ├── time │ └── module.mk ├── path │ └── module.mk ├── geometry │ └── module.mk ├── set │ └── module.mk ├── prefs │ └── module.mk ├── elfun │ └── module.mk ├── specfun │ └── module.mk └── optimization │ └── module.mk ├── doc ├── texmf.cnf ├── interpreter │ ├── octave_logo.pdf │ ├── images │ ├── doccheck │ │ └── aspell.conf │ ├── cp-idx.txi │ ├── fn-idx.txi │ ├── op-idx.txi │ └── pr-idx.txi ├── doxyhtml │ ├── DoxyfileQt.patch │ └── README ├── liboctave │ ├── error.texi │ ├── fn-idx.texi │ ├── install.texi │ ├── cp-idx.texi │ ├── bugs.texi │ └── intro.texi └── refcard │ └── refcard-a4.tex ├── libinterp ├── template-inst │ └── module.mk ├── octinterp.in.pc └── dldfcn │ └── module-files ├── liboctave ├── external │ ├── Faddeeva │ │ └── module.mk │ ├── dasrt │ │ └── module.mk │ ├── lapack-xtra │ │ ├── xslamch.f │ │ ├── xdlamch.f │ │ ├── xslange.f │ │ ├── xilaenv.f │ │ ├── xdlange.f │ │ └── module.mk │ ├── blas-xtra │ │ ├── xsnrm2.f │ │ ├── xdnrm2.f │ │ ├── xscnrm2.f │ │ ├── xdznrm2.f │ │ ├── xsdot.f │ │ ├── xddot.f │ │ ├── xcdotc.f │ │ ├── xcdotu.f │ │ ├── xzdotc.f │ │ └── xzdotu.f │ ├── dassl │ │ └── module.mk │ ├── slatec-err │ │ └── module.mk │ ├── odepack │ │ ├── module.mk │ │ └── vnorm.f │ ├── amos │ │ ├── zmlt.f │ │ ├── xzexp.f │ │ ├── zdiv.f │ │ ├── zshch.f │ │ ├── cshch.f │ │ ├── README │ │ ├── xzabs.f │ │ └── zuchk.f │ ├── quadpack │ │ └── module.mk │ ├── daspk │ │ └── module.mk │ ├── slatec-fn │ │ └── module.mk │ └── ranlib │ │ └── lennob.f └── octave.in.pc ├── .dir-locals.el ├── .editorconfig ├── m4 └── module.mk └── CITATION /test/publish/test_script_empty.m: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/bug-38236/df_vr.m: -------------------------------------------------------------------------------- 1 | # df_vr.m 2 | vr = 7; 3 | -------------------------------------------------------------------------------- /test/bug-53027/globals53027.m: -------------------------------------------------------------------------------- 1 | global a b c 2 | -------------------------------------------------------------------------------- /test/bug-52722/define_globals.m: -------------------------------------------------------------------------------- 1 | global a b c 2 | 3 | -------------------------------------------------------------------------------- /test/private-functions/private/bscript.m: -------------------------------------------------------------------------------- 1 | b = "bscript"; 2 | -------------------------------------------------------------------------------- /libgui/gui.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS = qterminal src 3 | -------------------------------------------------------------------------------- /test/nest/script_nest_script.m: -------------------------------------------------------------------------------- 1 | # script_nest_script.m 2 | x = 5; 3 | -------------------------------------------------------------------------------- /test/private-functions/private-functions.tst: -------------------------------------------------------------------------------- 1 | %!assert (fcn ()) 2 | -------------------------------------------------------------------------------- /test/bug-53027/gtest53027.m: -------------------------------------------------------------------------------- 1 | globals53027 2 | 3 | xx = a; 4 | clear b 5 | -------------------------------------------------------------------------------- /test/classdef-multiple-inheritance/base_1.m: -------------------------------------------------------------------------------- 1 | classdef base_1 2 | end 3 | -------------------------------------------------------------------------------- /test/classdef-multiple-inheritance/base_2.m: -------------------------------------------------------------------------------- 1 | classdef base_2 2 | end 3 | -------------------------------------------------------------------------------- /test/bug-35448/fB.m: -------------------------------------------------------------------------------- 1 | # fB.m 2 | function y = fB (x) 3 | y = x; 4 | endfunction 5 | -------------------------------------------------------------------------------- /test/bug-35448/fC.m: -------------------------------------------------------------------------------- 1 | # fC.m 2 | function y = fC (x) 3 | y = x; 4 | endfunction 5 | -------------------------------------------------------------------------------- /test/fcn-handle/f1.m: -------------------------------------------------------------------------------- 1 | function r = f1 () 2 | r = "top f1"; 3 | endfunction 4 | -------------------------------------------------------------------------------- /test/classes/@Snork/uplus.m: -------------------------------------------------------------------------------- 1 | function s = uplus (s1) 2 | 3 | s = s1; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /libgui/qterminal/qterminal.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS = libqterminal qterminal 3 | -------------------------------------------------------------------------------- /test/classes/@Dork/bling.m: -------------------------------------------------------------------------------- 1 | function out = bling (m1, m2) 2 | 3 | out = 1; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Pork/bling.m: -------------------------------------------------------------------------------- 1 | function out = bling (m1, m2) 2 | 3 | out = 2; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/fcn-handle/+pkga/+pkgb/f1.m: -------------------------------------------------------------------------------- 1 | function r = f1 () 2 | r = "pkg f1"; 3 | endfunction 4 | -------------------------------------------------------------------------------- /test/fcn-handle/+pkga/+pkgb/f2.m: -------------------------------------------------------------------------------- 1 | function r = f2 () 2 | r = "pkg f2"; 3 | endfunction 4 | -------------------------------------------------------------------------------- /etc/fonts/FreeSans.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/etc/fonts/FreeSans.otf -------------------------------------------------------------------------------- /examples/code/@polynomial/double.m: -------------------------------------------------------------------------------- 1 | function a = double (p) 2 | a = p.poly; 3 | endfunction 4 | -------------------------------------------------------------------------------- /test/bug-51532/+package_bug51532/foo.m: -------------------------------------------------------------------------------- 1 | function retval = foo (val) 2 | retval = val; 3 | end 4 | -------------------------------------------------------------------------------- /test/classdef/plist_t1.m: -------------------------------------------------------------------------------- 1 | classdef plist_t1 2 | properties 3 | a = 1 b 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /test/classdef/plist_t2.m: -------------------------------------------------------------------------------- 1 | classdef plist_t2 2 | properties 3 | a = 1; b 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Snork/cack.m: -------------------------------------------------------------------------------- 1 | function out = cack (in) 2 | 3 | out = in.cack; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Snork/double.m: -------------------------------------------------------------------------------- 1 | function x = double (snk) 2 | 3 | x = snk.gick; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Snork/ne.m: -------------------------------------------------------------------------------- 1 | function b = ne (s1, s2) 2 | 3 | b = ~(s1 == s2); 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Snork/tattack.m: -------------------------------------------------------------------------------- 1 | function s = tattack (x, y) 2 | 3 | s = 'Snork'; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Spork/cack.m: -------------------------------------------------------------------------------- 1 | function out = cack (in) 2 | 3 | out = in.cack; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /libgui/src/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/logo.png -------------------------------------------------------------------------------- /scripts/image/default.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/scripts/image/default.img -------------------------------------------------------------------------------- /test/classdef-multiple-inheritance/child_from_base_1.m: -------------------------------------------------------------------------------- 1 | classdef child_from_base_1 < base_1 2 | end 3 | -------------------------------------------------------------------------------- /test/classes/@Dork/private/myStash.m: -------------------------------------------------------------------------------- 1 | function out = myStash () 2 | 3 | out = 2; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Pork/private/myStash.m: -------------------------------------------------------------------------------- 1 | function out = myStash () 2 | 3 | out = 4; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Snork/private/myStash.m: -------------------------------------------------------------------------------- 1 | function out = myStash () 2 | 3 | out = 1; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Snork/subsindex.m: -------------------------------------------------------------------------------- 1 | function out = subsindex (obj) 2 | 3 | out = 0; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Spork/private/myStash.m: -------------------------------------------------------------------------------- 1 | function out = myStash () 2 | 3 | out = 3; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /doc/texmf.cnf: -------------------------------------------------------------------------------- 1 | % Increase save size to run @seealso macro for Octave documentation 2 | save_size = 10000 3 | -------------------------------------------------------------------------------- /etc/fonts/FreeSansBold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/etc/fonts/FreeSansBold.otf -------------------------------------------------------------------------------- /libgui/qterminal/qterminal/README: -------------------------------------------------------------------------------- 1 | here is sample program which uses QTermWidet for displaying a terminal 2 | -------------------------------------------------------------------------------- /libgui/src/icons/bp-next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/bp-next.png -------------------------------------------------------------------------------- /libgui/src/icons/bp-prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/bp-prev.png -------------------------------------------------------------------------------- /libgui/src/icons/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/circle.png -------------------------------------------------------------------------------- /libgui/src/icons/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/cross.png -------------------------------------------------------------------------------- /libgui/src/icons/db-cont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/db-cont.png -------------------------------------------------------------------------------- /libgui/src/icons/db-step.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/db-step.png -------------------------------------------------------------------------------- /libgui/src/icons/db-stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/db-stop.png -------------------------------------------------------------------------------- /libgui/src/icons/fleur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/fleur.png -------------------------------------------------------------------------------- /libgui/src/icons/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/folder.png -------------------------------------------------------------------------------- /libgui/src/icons/go-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/go-down.png -------------------------------------------------------------------------------- /libgui/src/icons/go-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/go-home.png -------------------------------------------------------------------------------- /libgui/src/icons/go-last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/go-last.png -------------------------------------------------------------------------------- /libgui/src/icons/go-next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/go-next.png -------------------------------------------------------------------------------- /libgui/src/icons/go-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/go-up.png -------------------------------------------------------------------------------- /libgui/src/icons/hand2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/hand2.png -------------------------------------------------------------------------------- /libgui/src/icons/zoom-in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/zoom-in.png -------------------------------------------------------------------------------- /test/bug-53468/ofig403.ofig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/test/bug-53468/ofig403.ofig -------------------------------------------------------------------------------- /test/bug-53468/ofig421.ofig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/test/bug-53468/ofig421.ofig -------------------------------------------------------------------------------- /test/bug-53468/ofig51.ofig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/test/bug-53468/ofig51.ofig -------------------------------------------------------------------------------- /test/class-concat/@foo/foo.m: -------------------------------------------------------------------------------- 1 | function r = foo () 2 | r = class (struct (), 'foo'); 3 | endfunction 4 | -------------------------------------------------------------------------------- /test/classdef/plist_t3.m: -------------------------------------------------------------------------------- 1 | classdef plist_t3 2 | properties 3 | a = 1 4 | b 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /test/classes/@Dork/getStash.m: -------------------------------------------------------------------------------- 1 | function out = getStash (cls) 2 | 3 | out = myStash (); 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@SizeTester/size.m: -------------------------------------------------------------------------------- 1 | function s = size (this) 2 | 3 | s = this.desired_size; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Snork/getStash.m: -------------------------------------------------------------------------------- 1 | function out = getStash (l) 2 | 3 | out = myStash (); 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Spork/getStash.m: -------------------------------------------------------------------------------- 1 | function out = getStash (cls) 2 | 3 | out = myStash (); 4 | 5 | end 6 | -------------------------------------------------------------------------------- /etc/fonts/FreeSansOblique.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/etc/fonts/FreeSansOblique.otf -------------------------------------------------------------------------------- /etc/icons/octave-sombrero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/etc/icons/octave-sombrero.png -------------------------------------------------------------------------------- /examples/code/@polynomial/roots.m: -------------------------------------------------------------------------------- 1 | function r = roots (p) 2 | r = roots (fliplr (p.poly)); 3 | endfunction 4 | -------------------------------------------------------------------------------- /libgui/src/icons/bp-rm-all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/bp-rm-all.png -------------------------------------------------------------------------------- /libgui/src/icons/bp-toggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/bp-toggle.png -------------------------------------------------------------------------------- /libgui/src/icons/edit-copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/edit-copy.png -------------------------------------------------------------------------------- /libgui/src/icons/edit-cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/edit-cut.png -------------------------------------------------------------------------------- /libgui/src/icons/edit-find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/edit-find.png -------------------------------------------------------------------------------- /libgui/src/icons/edit-redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/edit-redo.png -------------------------------------------------------------------------------- /libgui/src/icons/edit-undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/edit-undo.png -------------------------------------------------------------------------------- /libgui/src/icons/go-first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/go-first.png -------------------------------------------------------------------------------- /libgui/src/icons/left_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/left_side.png -------------------------------------------------------------------------------- /libgui/src/icons/top_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/top_side.png -------------------------------------------------------------------------------- /libgui/src/icons/user-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/user-home.png -------------------------------------------------------------------------------- /libgui/src/icons/zoom-out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/zoom-out.png -------------------------------------------------------------------------------- /test/bug-52722/bug-52722.tst: -------------------------------------------------------------------------------- 1 | %!test 2 | %! include_globals 3 | %! clear -global a b c; # cleanup after test 4 | -------------------------------------------------------------------------------- /doc/interpreter/octave_logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/doc/interpreter/octave_logo.pdf -------------------------------------------------------------------------------- /etc/fonts/FreeSansBoldOblique.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/etc/fonts/FreeSansBoldOblique.otf -------------------------------------------------------------------------------- /libgui/src/icons/bottom_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/bottom_side.png -------------------------------------------------------------------------------- /libgui/src/icons/db-step-in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/db-step-in.png -------------------------------------------------------------------------------- /libgui/src/icons/db-step-out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/db-step-out.png -------------------------------------------------------------------------------- /libgui/src/icons/dialog-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/dialog-error.png -------------------------------------------------------------------------------- /libgui/src/icons/document-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/document-new.png -------------------------------------------------------------------------------- /libgui/src/icons/edit-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/edit-delete.png -------------------------------------------------------------------------------- /libgui/src/icons/edit-paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/edit-paste.png -------------------------------------------------------------------------------- /libgui/src/icons/figure-axes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/figure-axes.png -------------------------------------------------------------------------------- /libgui/src/icons/figure-grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/figure-grid.png -------------------------------------------------------------------------------- /libgui/src/icons/figure-pan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/figure-pan.png -------------------------------------------------------------------------------- /libgui/src/icons/figure-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/figure-text.png -------------------------------------------------------------------------------- /libgui/src/icons/folder-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/folder-new.png -------------------------------------------------------------------------------- /libgui/src/icons/go-previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/go-previous.png -------------------------------------------------------------------------------- /libgui/src/icons/right_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/right_side.png -------------------------------------------------------------------------------- /libgui/src/icons/system-run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/system-run.png -------------------------------------------------------------------------------- /libgui/src/icons/view-refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/view-refresh.png -------------------------------------------------------------------------------- /libgui/src/icons/widget-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/widget-close.png -------------------------------------------------------------------------------- /libgui/src/icons/widget-dock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/widget-dock.png -------------------------------------------------------------------------------- /libinterp/template-inst/module.mk: -------------------------------------------------------------------------------- 1 | TEMPLATE_INST_SRC = \ 2 | %reldir%/Array-tc.cc \ 3 | %reldir%/Array-jit.cc 4 | -------------------------------------------------------------------------------- /test/bug-38691/dir2/func3.m: -------------------------------------------------------------------------------- 1 | function [r, f3] = func3 (x) 2 | f3 = "dir2/func3"; 3 | r = 1; 4 | endfunction 5 | -------------------------------------------------------------------------------- /test/classes/@CPrecedenceTester1/double.m: -------------------------------------------------------------------------------- 1 | function x = double (snk) 2 | 3 | x = snk.useless_data; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@CPrecedenceTester2/double.m: -------------------------------------------------------------------------------- 1 | function x = double (snk) 2 | 3 | x = snk.useless_data; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@CPrecedenceTester3/double.m: -------------------------------------------------------------------------------- 1 | function x = double (snk) 2 | 3 | x = snk.useless_data; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@SizeTester/numel.m: -------------------------------------------------------------------------------- 1 | function n = numel (this) 2 | 3 | n = prod (this.desired_size); 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Snork/saveobj.m: -------------------------------------------------------------------------------- 1 | function out = saveobj (in) 2 | 3 | out = in; 4 | out.cack = []; 5 | 6 | end 7 | -------------------------------------------------------------------------------- /test/classes/@Snork/uminus.m: -------------------------------------------------------------------------------- 1 | function s = uminus (s1) 2 | 3 | s = s1; 4 | s.gick = - s.gick; 5 | 6 | end 7 | -------------------------------------------------------------------------------- /test/fcn-handle/@fhdr_parent/numel.m: -------------------------------------------------------------------------------- 1 | function r = numel (x, varargin) 2 | r = numel (x.a, varargin{:}); 3 | end 4 | -------------------------------------------------------------------------------- /test/private-functions/private/ascript.m: -------------------------------------------------------------------------------- 1 | a = "ascript"; 2 | 3 | b = ""; 4 | bscript; 5 | assert (b, "bscript"); 6 | -------------------------------------------------------------------------------- /libgui/src/icons/dialog-warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/dialog-warning.png -------------------------------------------------------------------------------- /libgui/src/icons/document-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/document-open.png -------------------------------------------------------------------------------- /libgui/src/icons/document-print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/document-print.png -------------------------------------------------------------------------------- /libgui/src/icons/document-save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/document-save.png -------------------------------------------------------------------------------- /libgui/src/icons/figure-rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/figure-rotate.png -------------------------------------------------------------------------------- /libgui/src/icons/figure-zoom-in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/figure-zoom-in.png -------------------------------------------------------------------------------- /libgui/src/icons/plot-xy-curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/plot-xy-curve.png -------------------------------------------------------------------------------- /libgui/src/icons/widget-undock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/widget-undock.png -------------------------------------------------------------------------------- /libgui/src/icons/zoom-original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/zoom-original.png -------------------------------------------------------------------------------- /liboctave/external/Faddeeva/module.mk: -------------------------------------------------------------------------------- 1 | EXTERNAL_SOURCES += \ 2 | %reldir%/Faddeeva.cc \ 3 | %reldir%/Faddeeva.hh 4 | -------------------------------------------------------------------------------- /test/bug-50035/@bug50035/bug50035.m: -------------------------------------------------------------------------------- 1 | function s = bug50035 () 2 | s = class (struct (), "bug50035"); 3 | endfunction 4 | -------------------------------------------------------------------------------- /test/classdef-multiple-inheritance/child_from_base_1_and_2.m: -------------------------------------------------------------------------------- 1 | classdef child_from_base_1_and_2 < base_1 & base_2 2 | end 3 | -------------------------------------------------------------------------------- /test/classes/@CPrecedenceTester1/plus.m: -------------------------------------------------------------------------------- 1 | function s = plus (s1, s2) 2 | 3 | s = 'CPrecedenceTester1'; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@CPrecedenceTester2/plus.m: -------------------------------------------------------------------------------- 1 | function s = plus (s1, s2) 2 | 3 | s = 'CPrecedenceTester2'; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@CPrecedenceTester3/plus.m: -------------------------------------------------------------------------------- 1 | function s = plus (s1, s2) 2 | 3 | s = 'CPrecedenceTester3'; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/publish/test_script_head_only.m: -------------------------------------------------------------------------------- 1 | %% Headline 2 | % Headline description. 3 | % about some lines no blanks 4 | %% 5 | -------------------------------------------------------------------------------- /examples/code/@polynomial/numel.m: -------------------------------------------------------------------------------- 1 | function n = numel (obj, idx) 2 | n = 1; # always produce an array. 3 | endfunction 4 | -------------------------------------------------------------------------------- /libgui/src/icons/document-save-as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/document-save-as.png -------------------------------------------------------------------------------- /libgui/src/icons/edit-find-replace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/edit-find-replace.png -------------------------------------------------------------------------------- /libgui/src/icons/figure-zoom-out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/figure-zoom-out.png -------------------------------------------------------------------------------- /libgui/src/icons/top_left_corner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/top_left_corner.png -------------------------------------------------------------------------------- /libgui/src/icons/top_right_corner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/top_right_corner.png -------------------------------------------------------------------------------- /libgui/src/icons/widget-dock-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/widget-dock-light.png -------------------------------------------------------------------------------- /test/bug-36025/@testclass/one.m: -------------------------------------------------------------------------------- 1 | % function ONE return item "X" 2 | 3 | function a = one (m) 4 | a = m.x; 5 | endfunction 6 | -------------------------------------------------------------------------------- /test/bug-36025/@testclass/two.m: -------------------------------------------------------------------------------- 1 | % function TWO returns item "Y" 2 | 3 | function a = one (m) 4 | a = m.y; 5 | endfunction 6 | -------------------------------------------------------------------------------- /test/bug-50035/@bug50035/display.m: -------------------------------------------------------------------------------- 1 | function display (x) 2 | global in_name; 3 | in_name = inputname (1); 4 | endfunction 5 | -------------------------------------------------------------------------------- /test/classes/@CPrecedenceTester1/tattack.m: -------------------------------------------------------------------------------- 1 | function s = tattack (x, y) 2 | 3 | s = 'CPrecedenceTester1'; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@CPrecedenceTester2/tattack.m: -------------------------------------------------------------------------------- 1 | function s = tattack (x, y) 2 | 3 | s = 'CPrecedenceTester2'; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@CPrecedenceTester3/tattack.m: -------------------------------------------------------------------------------- 1 | function s = tattack (x, y) 2 | 3 | s = 'CPrecedenceTester3'; 4 | 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@Snork/loadobj.m: -------------------------------------------------------------------------------- 1 | function out = loadobj (in) 2 | 3 | out = in; 4 | out.cack = [-1 -2 -3 -4]; 5 | 6 | end 7 | -------------------------------------------------------------------------------- /test/classes/@Spork/saveobj.m: -------------------------------------------------------------------------------- 1 | function out = saveobj (in) 2 | 3 | out = in; 4 | %rmfield (out,'cack'); 5 | 6 | end 7 | -------------------------------------------------------------------------------- /test/fcn-handle/@fhdr_other/getsize_cellfun.m: -------------------------------------------------------------------------------- 1 | function r = getsize_cellfun (x) 2 | r = cellfun (@numel, {x.d}); 3 | end 4 | -------------------------------------------------------------------------------- /test/pkg/mfile_basic_test/INDEX: -------------------------------------------------------------------------------- 1 | mfile-basic-example-package >> Basic Example Package. 2 | Example m-file 3 | example_mfile 4 | -------------------------------------------------------------------------------- /libgui/src/icons/applications-system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/applications-system.png -------------------------------------------------------------------------------- /libgui/src/icons/bottom_left_corner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/bottom_left_corner.png -------------------------------------------------------------------------------- /libgui/src/icons/bottom_right_corner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/bottom_right_corner.png -------------------------------------------------------------------------------- /libgui/src/icons/dialog-information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/dialog-information.png -------------------------------------------------------------------------------- /libgui/src/icons/preferences-system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/preferences-system.png -------------------------------------------------------------------------------- /libgui/src/icons/widget-close-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/widget-close-light.png -------------------------------------------------------------------------------- /libgui/src/icons/widget-undock-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/widget-undock-light.png -------------------------------------------------------------------------------- /test/bug-46660/class_bug46660.m: -------------------------------------------------------------------------------- 1 | classdef class_bug46660 2 | properties 3 | x 4 | y 5 | endproperties 6 | endclassdef 7 | -------------------------------------------------------------------------------- /test/bug-54995/@testclass54995/subsref.m: -------------------------------------------------------------------------------- 1 | function val = subsref (obj, S) 2 | val = builtin ("subsref", obj, S); 3 | endfunction 4 | -------------------------------------------------------------------------------- /test/pkg/mfile_basic_test/NEWS: -------------------------------------------------------------------------------- 1 | mfile-basic-example-package 0.1.0 2 | --------------------------------- 3 | 4 | * Initial version 5 | -------------------------------------------------------------------------------- /examples/code/@polynomial/mtimes.m: -------------------------------------------------------------------------------- 1 | function p = mtimes (a, b) 2 | p = polynomial (conv (double (a), double (b))); 3 | endfunction 4 | -------------------------------------------------------------------------------- /libgui/src/icons/figure-zoom-original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/figure-zoom-original.png -------------------------------------------------------------------------------- /libgui/src/icons/letter_logo_FileEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/letter_logo_FileEditor.png -------------------------------------------------------------------------------- /liboctave/external/dasrt/module.mk: -------------------------------------------------------------------------------- 1 | EXTERNAL_SOURCES += \ 2 | %reldir%/ddasrt.f \ 3 | %reldir%/drchek.f \ 4 | %reldir%/droots.f 5 | -------------------------------------------------------------------------------- /test/bug-44940/class_bug44940.m: -------------------------------------------------------------------------------- 1 | classdef class_bug44940 < handle 2 | properties 3 | child 4 | endproperties 5 | endclassdef 6 | -------------------------------------------------------------------------------- /test/bug-50831/module.mk: -------------------------------------------------------------------------------- 1 | bug_50831_TEST_FILES = \ 2 | test/bug-50831/bug-50831.tst 3 | 4 | TEST_FILES += $(bug_50831_TEST_FILES) 5 | -------------------------------------------------------------------------------- /test/nest/arg_ret.m: -------------------------------------------------------------------------------- 1 | function a = arg_ret 2 | a = 10; 3 | f; 4 | function a = f 5 | a = 5; 6 | endfunction 7 | endfunction 8 | -------------------------------------------------------------------------------- /libgui/src/icons/graphic_logo_FileEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/graphic_logo_FileEditor.png -------------------------------------------------------------------------------- /test/bug-38691/dir2/func2.m: -------------------------------------------------------------------------------- 1 | function [r, f2, f3] = func2 (x) 2 | f2 = "dir2/func2"; 3 | [r, f3] = feval ("func3", x); 4 | endfunction 5 | -------------------------------------------------------------------------------- /test/bug-53956/bug53956_class_3.m: -------------------------------------------------------------------------------- 1 | classdef bug53956_class_3 < bug53956_class_2 2 | properties 3 | end 4 | methods 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /libgui/src/icons/graphic_logo_NewsDockWidget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/graphic_logo_NewsDockWidget.png -------------------------------------------------------------------------------- /libgui/src/icons/graphic_logo_ReleaseWidget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/graphic_logo_ReleaseWidget.png -------------------------------------------------------------------------------- /libgui/src/icons/graphic_logo_VariableEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/graphic_logo_VariableEditor.png -------------------------------------------------------------------------------- /libgui/src/icons/graphic_logo_WorkspaceView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/graphic_logo_WorkspaceView.png -------------------------------------------------------------------------------- /libgui/src/icons/letter_logo_FilesDockWidget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/letter_logo_FilesDockWidget.png -------------------------------------------------------------------------------- /libgui/src/icons/letter_logo_NewsDockWidget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/letter_logo_NewsDockWidget.png -------------------------------------------------------------------------------- /libgui/src/icons/letter_logo_ReleaseWidget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/letter_logo_ReleaseWidget.png -------------------------------------------------------------------------------- /libgui/src/icons/letter_logo_VariableEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/letter_logo_VariableEditor.png -------------------------------------------------------------------------------- /libgui/src/icons/letter_logo_WorkspaceView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/letter_logo_WorkspaceView.png -------------------------------------------------------------------------------- /test/fcn-handle/@fhdr_other/fhdr_other.m: -------------------------------------------------------------------------------- 1 | function r = fhdr_other (n) 2 | s.d = fhdr_derived (n); 3 | r = class (s, 'fhdr_other'); 4 | end 5 | -------------------------------------------------------------------------------- /test/fcn-handle/@fhdr_parent/fhdr_parent.m: -------------------------------------------------------------------------------- 1 | function r = fhdr_parent (n) 2 | s.a = rand (n, 1); 3 | r = class (s, 'fhdr_parent'); 4 | end 5 | -------------------------------------------------------------------------------- /examples/code/@FIRfilter/display.m: -------------------------------------------------------------------------------- 1 | function display (f) 2 | printf ("%s.polynomial", inputname (1)); 3 | disp (f.polynomial); 4 | endfunction 5 | -------------------------------------------------------------------------------- /libgui/src/icons/graphic_logo_FilesDockWidget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/graphic_logo_FilesDockWidget.png -------------------------------------------------------------------------------- /libgui/src/icons/letter_logo_HistoryDockWidget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/letter_logo_HistoryDockWidget.png -------------------------------------------------------------------------------- /test/bug-36025/@testclass/testclass.m: -------------------------------------------------------------------------------- 1 | function m = testclass (x,y) 2 | m = struct ('x',x,'y',y); 3 | m = class (m,"testclass"); 4 | endfunction 5 | -------------------------------------------------------------------------------- /test/bug-38691/dir2/func1.m: -------------------------------------------------------------------------------- 1 | function [r, f1, f2, f3] = func1 (x) 2 | f1 = "dir2/func1"; 3 | [r, f2, f3] = feval ("func2", x); 4 | endfunction 5 | -------------------------------------------------------------------------------- /test/classes/@Blork/display.m: -------------------------------------------------------------------------------- 1 | function display (s) 2 | 3 | disp ([inputname(1),'.bleek = ']); 4 | disp (' '); 5 | disp (s.bleek); 6 | 7 | end 8 | -------------------------------------------------------------------------------- /test/classes/@Cork/display.m: -------------------------------------------------------------------------------- 1 | function display (s) 2 | 3 | disp ([inputname(1),'.click = ']); 4 | disp (' '); 5 | disp (s.click); 6 | 7 | end 8 | -------------------------------------------------------------------------------- /test/classes/@Snork/display.m: -------------------------------------------------------------------------------- 1 | function display (s) 2 | 3 | disp ([inputname(1),'.gick = ']); 4 | disp (' '); 5 | disp (s.gick); 6 | 7 | end 8 | -------------------------------------------------------------------------------- /test/classes/@Snork/eq.m: -------------------------------------------------------------------------------- 1 | function b = eq (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | b = isequal (x1, x2); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Snork/ge.m: -------------------------------------------------------------------------------- 1 | function b = ge (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | b = (x1(1) >= x2(1)); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Snork/gt.m: -------------------------------------------------------------------------------- 1 | function b = gt (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | b = (x1(1) > x2(1)); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Snork/le.m: -------------------------------------------------------------------------------- 1 | function b = le (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | b = (x1(1) <= x2(1)); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Snork/lt.m: -------------------------------------------------------------------------------- 1 | function b = lt (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | b = (x1(1) < x2(1)); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Spork/display.m: -------------------------------------------------------------------------------- 1 | function display (s) 2 | 3 | disp ([inputname(1),'.geek = ']); 4 | disp (' '); 5 | disp (s.geek); 6 | 7 | end 8 | -------------------------------------------------------------------------------- /test/ctor-vs-method/@other/parent.m: -------------------------------------------------------------------------------- 1 | function r = parent (a) 2 | __trace__ ('begin other/parent'); 3 | __trace__ ('end other/parent'); 4 | end 5 | -------------------------------------------------------------------------------- /libgui/src/icons/graphic_logo_HistoryDockWidget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/graphic_logo_HistoryDockWidget.png -------------------------------------------------------------------------------- /libgui/src/icons/graphic_logo_TerminalDockWidget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/graphic_logo_TerminalDockWidget.png -------------------------------------------------------------------------------- /libgui/src/icons/letter_logo_TerminalDockWidget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/letter_logo_TerminalDockWidget.png -------------------------------------------------------------------------------- /test/bug-35881/module.mk: -------------------------------------------------------------------------------- 1 | bug_35881_TEST_FILES = \ 2 | %reldir%/bug-35881.tst \ 3 | %reldir%/bug35881.m 4 | 5 | TEST_FILES += $(bug_35881_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/bug-45351/module.mk: -------------------------------------------------------------------------------- 1 | bug_45351_TEST_FILES = \ 2 | %reldir%/bug45351.m \ 3 | %reldir%/bug-45351.tst 4 | 5 | TEST_FILES += $(bug_45351_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/bug-50716/module.mk: -------------------------------------------------------------------------------- 1 | bug_50716_TEST_FILES = \ 2 | %reldir%/bug-50716.tst \ 3 | %reldir%/myclass.m 4 | 5 | TEST_FILES += $(bug_50716_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/classes/@Snork/minus.m: -------------------------------------------------------------------------------- 1 | function s = minus (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | s = Snork (x1 - x2); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Snork/plus.m: -------------------------------------------------------------------------------- 1 | function s = plus (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | s = Snork (x1 + x2); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Spork/loadobj.m: -------------------------------------------------------------------------------- 1 | function out = loadobj (in) 2 | 3 | out = in; 4 | if (~isa (in, 'Spork')) 5 | out.cack = []; 6 | end 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/private-functions/private/pfcn2.m: -------------------------------------------------------------------------------- 1 | function r = pfcn2 () 2 | r = "pfcn2"; 3 | a = ""; 4 | ascript; 5 | assert (a, "ascript"); 6 | endfunction 7 | -------------------------------------------------------------------------------- /test/bug-41723/module.mk: -------------------------------------------------------------------------------- 1 | bug_41723_TEST_FILES = \ 2 | %reldir%/bug-41723.tst \ 3 | %reldir%/class_bug41723.m 4 | 5 | TEST_FILES += $(bug_41723_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/bug-44940/module.mk: -------------------------------------------------------------------------------- 1 | bug_44940_TEST_FILES = \ 2 | %reldir%/bug-44940.tst \ 3 | %reldir%/class_bug44940.m 4 | 5 | TEST_FILES += $(bug_44940_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/bug-46660/module.mk: -------------------------------------------------------------------------------- 1 | bug_46660_TEST_FILES = \ 2 | %reldir%/bug-46660.tst \ 3 | %reldir%/class_bug46660.m 4 | 5 | TEST_FILES += $(bug_46660_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/bug-49379/module.mk: -------------------------------------------------------------------------------- 1 | bug_49379_TEST_FILES = \ 2 | %reldir%/bug-49379.tst \ 3 | %reldir%/class_bug49379.m 4 | 5 | TEST_FILES += $(bug_49379_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/bug-51192/module.mk: -------------------------------------------------------------------------------- 1 | bug_51192_TEST_FILES = \ 2 | %reldir%/bug-51192.tst \ 3 | %reldir%/class_bug51192.m 4 | 5 | TEST_FILES += $(bug_51192_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/bug-51599/module.mk: -------------------------------------------------------------------------------- 1 | bug_51599_TEST_FILES = \ 2 | %reldir%/bug-51599.tst \ 3 | %reldir%/class_bug51599.m 4 | 5 | TEST_FILES += $(bug_51599_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/bug-52075/module.mk: -------------------------------------------------------------------------------- 1 | bug_52075_TEST_FILES = \ 2 | %reldir%/bug-52075.tst \ 3 | %reldir%/class_bug52075.m 4 | 5 | TEST_FILES += $(bug_52075_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/classes/@Snork/horzcat.m: -------------------------------------------------------------------------------- 1 | function s = horzcat (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | s = Snork ([x1 x2]); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Snork/ldivide.m: -------------------------------------------------------------------------------- 1 | function s = ldivide (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | s = Snork(x1 .\ x2); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Snork/mldivide.m: -------------------------------------------------------------------------------- 1 | function s = mldivide (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | s = Snork (x1 \ x2); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Snork/mrdivide.m: -------------------------------------------------------------------------------- 1 | function s = mrdivide (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | s = Snork (x1 / x2); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Snork/mtimes.m: -------------------------------------------------------------------------------- 1 | function s = mtimes (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | s = Snork (x1 * x2); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Snork/rdivide.m: -------------------------------------------------------------------------------- 1 | function s = rdivide (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | s = Snork(x1 ./ x2); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Snork/times.m: -------------------------------------------------------------------------------- 1 | function s = times (s1, s2, s3) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | s = Snork (x1 .* x2); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Snork/vertcat.m: -------------------------------------------------------------------------------- 1 | function s = vertcat (s1, s2) 2 | 3 | x1 = double (s1); 4 | x2 = double (s2); 5 | 6 | s = Snork ([x1; x2]); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/nest/arg_nest.m: -------------------------------------------------------------------------------- 1 | # arg_nest.m 2 | function x = arg_nest 3 | x = 1; 4 | A (x); 5 | function A (x) 6 | x = 2; 7 | endfunction 8 | endfunction 9 | -------------------------------------------------------------------------------- /libgui/src/icons/graphic_logo_DocumentationDockWidget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/graphic_logo_DocumentationDockWidget.png -------------------------------------------------------------------------------- /libgui/src/icons/letter_logo_DocumentationDockWidget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NexMirror/Octave/HEAD/libgui/src/icons/letter_logo_DocumentationDockWidget.png -------------------------------------------------------------------------------- /test/bug-55758/module.mk: -------------------------------------------------------------------------------- 1 | bug_55758_TEST_FILES = \ 2 | %reldir%/bug-55758.tst \ 3 | %reldir%/class_bug_55758.m 4 | 5 | TEST_FILES += $(bug_55758_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/fcn-handle/@fhdr_derived/fhdr_derived.m: -------------------------------------------------------------------------------- 1 | function r = fhdr_derived (n) 2 | s.a = n; 3 | p = fhdr_parent (n); 4 | r = class (s, 'fhdr_derived', p); 5 | end 6 | -------------------------------------------------------------------------------- /test/fcn-handle/bug51709_a.m: -------------------------------------------------------------------------------- 1 | classdef bug51709_a 2 | methods (Static) 3 | function r = smeth () 4 | r = "top bug51709_a"; 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/bug-51532/module.mk: -------------------------------------------------------------------------------- 1 | bug_51532_TEST_FILES = \ 2 | %reldir%/+package_bug51532/foo.m \ 3 | %reldir%/bug-51532.tst 4 | 5 | TEST_FILES += $(bug_51532_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/class-concat/module.mk: -------------------------------------------------------------------------------- 1 | class_concat_TEST_FILES = \ 2 | %reldir%/@foo/foo.m \ 3 | %reldir%/class-concat.tst 4 | 5 | TEST_FILES += $(class_concat_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/fcn-handle/@fhdr_other/getsize_arrayfun.m: -------------------------------------------------------------------------------- 1 | function r = getsize_arrayfun (x) 2 | r = arrayfun (@(i) numel (x(i).d), 1:numel (x), 'uniformoutput', true); 3 | end 4 | -------------------------------------------------------------------------------- /test/nest/nest_eval.m: -------------------------------------------------------------------------------- 1 | function x = nest_eval (a, b) 2 | eval (a); 3 | nested (); 4 | 5 | function nested () 6 | eval (b); 7 | endfunction 8 | endfunction 9 | -------------------------------------------------------------------------------- /examples/code/COPYING: -------------------------------------------------------------------------------- 1 | Copyright notices are intentionally omitted from the files in the 2 | examples directory. We don't want copyright notices cluttering the 3 | manual. 4 | -------------------------------------------------------------------------------- /scripts/profiler/html/flat_entry.html: -------------------------------------------------------------------------------- 1 | 2 | %name 3 | %timeabs 4 | %timerel 5 | %calls 6 | 7 | -------------------------------------------------------------------------------- /test/bug-38236/module.mk: -------------------------------------------------------------------------------- 1 | bug_38236_TEST_FILES = \ 2 | %reldir%/bug-38236.tst \ 3 | %reldir%/df_vr.m \ 4 | %reldir%/u_vr.m 5 | 6 | TEST_FILES += $(bug_38236_TEST_FILES) 7 | -------------------------------------------------------------------------------- /test/bug-51192/class_bug51192.m: -------------------------------------------------------------------------------- 1 | classdef class_bug51192 2 | methods (Static) 3 | function foo (val) 4 | val; 5 | endfunction 6 | endmethods 7 | endclassdef 8 | -------------------------------------------------------------------------------- /test/bug-54995/@testclass54995/testclass54995.m: -------------------------------------------------------------------------------- 1 | function obj = testclass54995 () 2 | obj = struct ("x", eye (4)); 3 | obj = class(obj, "testclass54995"); 4 | endfunction 5 | -------------------------------------------------------------------------------- /test/ctor-vs-method/@parent/method.m: -------------------------------------------------------------------------------- 1 | function r = method (a) 2 | __trace__ ('begin parent/method'); 3 | r = parent (a); 4 | __trace__ ('end parent/method'); 5 | end 6 | -------------------------------------------------------------------------------- /test/classes/@SizeTester/SizeTester.m: -------------------------------------------------------------------------------- 1 | function x = SizeTester (desired_size) 2 | 3 | x = struct ("desired_size", desired_size); 4 | x = class (x, "SizeTester"); 5 | 6 | end 7 | -------------------------------------------------------------------------------- /test/fcn-handle/+pkga/+pkgb/bug51709_a.m: -------------------------------------------------------------------------------- 1 | classdef bug51709_a 2 | methods (Static) 3 | function r = smeth () 4 | r = "pkg bug51709_a"; 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/fcn-handle/+pkga/+pkgb/bug51709_b.m: -------------------------------------------------------------------------------- 1 | classdef bug51709_b 2 | methods (Static) 3 | function r = smeth () 4 | r = "pkg bug51709_b"; 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /scripts/profiler/html/hierarchical_entry.html: -------------------------------------------------------------------------------- 1 | 2 | %name 3 | %total 4 | %self 5 | %calls 6 | 7 | -------------------------------------------------------------------------------- /test/fcn-handle/@fhdr_other/getsize_loop.m: -------------------------------------------------------------------------------- 1 | function r = getsize_loop (x) 2 | n = numel (x); 3 | r = zeros (1, n); 4 | for i = 1:n 5 | r(i) = numel (x(i).d); 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/classes/@Snork/ctranspose.m: -------------------------------------------------------------------------------- 1 | function s = ctranspose (s) 2 | 3 | x = double (s); 4 | 5 | s = Snork (x' + 4); % +4 To make sure some non-standard tranpose is called. 6 | 7 | end 8 | -------------------------------------------------------------------------------- /test/classes/@Snork/transpose.m: -------------------------------------------------------------------------------- 1 | function s = transpose (s) 2 | 3 | x = double (s); 4 | 5 | s = Snork (x.' + 2); % +2 To make sure some non-standard tranpose is called. 6 | 7 | end 8 | -------------------------------------------------------------------------------- /test/ctor-vs-method/@other/other.m: -------------------------------------------------------------------------------- 1 | function r = other (varargin) 2 | __trace__ ('begin other/other'); 3 | r = class (struct (), 'other'); 4 | __trace__ ('end other/other'); 5 | end 6 | -------------------------------------------------------------------------------- /test/local-functions/module.mk: -------------------------------------------------------------------------------- 1 | local_functions_TEST_FILES = \ 2 | %reldir%/local_functions.tst \ 3 | %reldir%/local_function_eval.m 4 | 5 | TEST_FILES += $(local_functions_TEST_FILES) 6 | -------------------------------------------------------------------------------- /test/private-functions/private/pfcn1.m: -------------------------------------------------------------------------------- 1 | function r = pfcn1 () 2 | r = "pfcn1"; 3 | a = ""; 4 | ascript; 5 | assert (a, "ascript"); 6 | assert (pfcn2 (), "pfcn2"); 7 | endfunction 8 | -------------------------------------------------------------------------------- /test/bug-35448/module.mk: -------------------------------------------------------------------------------- 1 | bug_35448_TEST_FILES = \ 2 | %reldir%/bug-35448.tst \ 3 | %reldir%/fA.m \ 4 | %reldir%/fB.m \ 5 | %reldir%/fC.m 6 | 7 | TEST_FILES += $(bug_35448_TEST_FILES) 8 | -------------------------------------------------------------------------------- /test/bug-47680/module.mk: -------------------------------------------------------------------------------- 1 | bug_47680_TEST_FILES = \ 2 | %reldir%/bug-47680.tst \ 3 | %reldir%/sub_bug47680.m \ 4 | %reldir%/super_bug47680.m 5 | 6 | TEST_FILES += $(bug_47680_TEST_FILES) 7 | -------------------------------------------------------------------------------- /test/bug-51534/module.mk: -------------------------------------------------------------------------------- 1 | bug_51534_TEST_FILES = \ 2 | %reldir%/bug-51534.tst \ 3 | %reldir%/child_bug51534.m \ 4 | %reldir%/parent_bug51534.m 5 | 6 | TEST_FILES += $(bug_51534_TEST_FILES) 7 | -------------------------------------------------------------------------------- /test/classes/@Dork/gack.m: -------------------------------------------------------------------------------- 1 | function out = gack (in, val) 2 | 3 | if (nargin == 1) 4 | out = in.gack; 5 | else 6 | in.gack = val; 7 | out = in; 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/classes/@Gork/cork.m: -------------------------------------------------------------------------------- 1 | function out = cork (in, val) 2 | 3 | if (nargin == 1) 4 | out = in.Cork; 5 | else 6 | in.Cork = val; 7 | out = in; 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/classes/@Gork/gark.m: -------------------------------------------------------------------------------- 1 | function out = gark (in, val) 2 | 3 | if (nargin == 1) 4 | out = in.gark; 5 | else 6 | in.gark = val; 7 | out = in; 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/classes/@Pork/gurk.m: -------------------------------------------------------------------------------- 1 | function out = gurk (in, val) 2 | 3 | if (nargin == 1) 4 | out = in.gurk; 5 | else 6 | in.gurk = val; 7 | out = in; 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/classes/@Snork/gick.m: -------------------------------------------------------------------------------- 1 | function out = gick (in, val) 2 | 3 | if (nargin == 1) 4 | out = in.gick; 5 | else 6 | in.gick = val; 7 | out = in; 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/classes/@Spork/geek.m: -------------------------------------------------------------------------------- 1 | function out = geek (in, val) 2 | 3 | if (nargin == 1) 4 | out = in.geek; 5 | else 6 | in.geek = val; 7 | out = in; 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/bug-52722/module.mk: -------------------------------------------------------------------------------- 1 | bug_52722_TEST_FILES = \ 2 | %reldir%/bug-52722.tst \ 3 | %reldir%/define_globals.m \ 4 | %reldir%/include_globals.m 5 | 6 | TEST_FILES += $(bug_52722_TEST_FILES) 7 | -------------------------------------------------------------------------------- /test/classes/@Blork/bleek.m: -------------------------------------------------------------------------------- 1 | function out = bleek (in, val) 2 | 3 | if (nargin == 1) 4 | out = in.bleek; 5 | else 6 | in.bleek = val; 7 | out = in; 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/classes/@Cork/click.m: -------------------------------------------------------------------------------- 1 | function out = click (in, val) 2 | 3 | if (nargin == 1) 4 | out = in.click; 5 | else 6 | in.click = val; 7 | out = in; 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/nest/persistent_nest.m: -------------------------------------------------------------------------------- 1 | # persistent_nest 2 | function y = persistent_nest () 3 | persistent x = 0; 4 | g; 5 | y = x; 6 | 7 | function g 8 | x = x + 1; 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /liboctave/external/lapack-xtra/xslamch.f: -------------------------------------------------------------------------------- 1 | subroutine xslamch (cmach, retval) 2 | character cmach 3 | real retval, slamch 4 | retval = slamch (cmach) 5 | return 6 | end 7 | -------------------------------------------------------------------------------- /test/bug-50035/module.mk: -------------------------------------------------------------------------------- 1 | bug_50035_TEST_FILES = \ 2 | %reldir%/@bug50035/bug50035.m \ 3 | %reldir%/@bug50035/display.m \ 4 | %reldir%/bug-50035.tst 5 | 6 | TEST_FILES += $(bug_50035_TEST_FILES) 7 | -------------------------------------------------------------------------------- /test/classes/@Gork/subsref.m: -------------------------------------------------------------------------------- 1 | function x = subsref (g, s) 2 | 3 | switch s.type 4 | case '.' 5 | switch s.subs 6 | case 'gyrk' 7 | x = g.gyrk; 8 | end 9 | end 10 | 11 | end 12 | -------------------------------------------------------------------------------- /test/nest/counter.m: -------------------------------------------------------------------------------- 1 | function fcnHandle = counter 2 | value = 0; 3 | function currentValue = increment 4 | value = value+1; 5 | currentValue = value; 6 | end 7 | fcnHandle = @increment; 8 | end 9 | -------------------------------------------------------------------------------- /liboctave/external/blas-xtra/xsnrm2.f: -------------------------------------------------------------------------------- 1 | subroutine xsnrm2 (n, x, incx, retval) 2 | real snrm2, x(*), retval 3 | integer n, incx 4 | retval = snrm2 (n, x, incx) 5 | return 6 | end 7 | -------------------------------------------------------------------------------- /liboctave/external/lapack-xtra/xdlamch.f: -------------------------------------------------------------------------------- 1 | subroutine xdlamch (cmach, retval) 2 | character cmach 3 | double precision retval, dlamch 4 | retval = dlamch (cmach) 5 | return 6 | end 7 | -------------------------------------------------------------------------------- /test/classes/@Dork/get.m: -------------------------------------------------------------------------------- 1 | function v = get (s, propName) 2 | 3 | switch propName 4 | case 'gack' 5 | v = s.gack; 6 | otherwise 7 | v = get (s.Snork,propName); 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/classes/@Gork/subsasgn.m: -------------------------------------------------------------------------------- 1 | function g = subsasgn (g, s, x) 2 | 3 | switch s.type 4 | case '.' 5 | switch s.subs 6 | case 'gyrk' 7 | g.gyrk = x; 8 | end 9 | end 10 | 11 | end 12 | -------------------------------------------------------------------------------- /test/ctor-vs-method/@derived/derived.m: -------------------------------------------------------------------------------- 1 | function r = derived (varargin) 2 | __trace__ ('begin derived/derived'); 3 | r = class (struct (), 'derived', parent ()); 4 | __trace__ ('end derived/derived'); 5 | end 6 | -------------------------------------------------------------------------------- /test/bug-53468/module.mk: -------------------------------------------------------------------------------- 1 | bug_53468_TEST_FILES = \ 2 | %reldir%/bug-53468.tst \ 3 | %reldir%/ofig403.ofig \ 4 | %reldir%/ofig421.ofig \ 5 | %reldir%/ofig51.ofig 6 | 7 | TEST_FILES += $(bug_53468_TEST_FILES) 8 | 9 | -------------------------------------------------------------------------------- /test/bug-54995/module.mk: -------------------------------------------------------------------------------- 1 | bug_54995_TEST_FILES = \ 2 | %reldir%/@testclass54995/testclass54995.m \ 3 | %reldir%/@testclass54995/subsref.m \ 4 | %reldir%/bug-54995.tst 5 | 6 | TEST_FILES += $(bug_54995_TEST_FILES) 7 | -------------------------------------------------------------------------------- /test/classes/@Pork/get.m: -------------------------------------------------------------------------------- 1 | function v = get (s, propName) 2 | 3 | switch propName 4 | case 'gurk' 5 | v = s.gurk; 6 | otherwise 7 | v = get (s.Spork, propName); 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /.dir-locals.el: -------------------------------------------------------------------------------- 1 | ((nil . 2 | ((c-file-style . "gnu") 3 | (indent-tabs-mode . nil) 4 | (fill-column . 72))) 5 | (change-log-mode . ((indent-tabs-mode . t))) 6 | (makefile-mode . ((indent-tabs-mode . t)))) 7 | -------------------------------------------------------------------------------- /liboctave/external/blas-xtra/xdnrm2.f: -------------------------------------------------------------------------------- 1 | subroutine xdnrm2 (n, x, incx, retval) 2 | double precision dnrm2, x(*), retval 3 | integer n, incx 4 | retval = dnrm2 (n, x, incx) 5 | return 6 | end 7 | -------------------------------------------------------------------------------- /test/bug-35448/fA.m: -------------------------------------------------------------------------------- 1 | # fA.m 2 | function y = fA (x, f) 3 | global gfun 4 | if nargin < 2 5 | y = fA (x, gfun); 6 | else 7 | w = feval (f, x); 8 | y = feval (@fB, w); 9 | endif 10 | endfunction 11 | -------------------------------------------------------------------------------- /test/bug-51534/child_bug51534.m: -------------------------------------------------------------------------------- 1 | classdef child_bug51534 < parent_bug51534 2 | methods 3 | function self = child_bug51534 (val) 4 | self@parent_bug51534 (val); 5 | endfunction 6 | endmethods 7 | endclassdef 8 | -------------------------------------------------------------------------------- /test/classes/@Snork/power.m: -------------------------------------------------------------------------------- 1 | function s = power (s1, x) 2 | 3 | if (~isa (s1, 'Snork') || isa (x, 'Snork')) 4 | error ('power Snork!!!'); 5 | end 6 | 7 | s = s1; 8 | s.gick = s.gick .^ x; 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/classes/@Snork/end.m: -------------------------------------------------------------------------------- 1 | function r = end (snk, index_pos, num_indices) 2 | 3 | if (num_indices ~= 1) 4 | error ('Snork object may only have one index') 5 | end 6 | 7 | r = length (snk.cack); 8 | 9 | end 10 | -------------------------------------------------------------------------------- /test/classes/@Snork/mpower.m: -------------------------------------------------------------------------------- 1 | function s = mpower (s1, x) 2 | 3 | if (~isa (s1, 'Snork') || isa (x, 'Snork')) 4 | error ('mpower Snork!!!'); 5 | end 6 | 7 | s = s1; 8 | s.gick = s.gick ^ x; 9 | 10 | end 11 | -------------------------------------------------------------------------------- /liboctave/external/blas-xtra/xscnrm2.f: -------------------------------------------------------------------------------- 1 | subroutine xscnrm2 (n, x, incx, retval) 2 | real scnrm2, retval 3 | complex x(*) 4 | integer n, incx 5 | retval = scnrm2 (n, x, incx) 6 | return 7 | end 8 | -------------------------------------------------------------------------------- /test/bug-36025/module.mk: -------------------------------------------------------------------------------- 1 | bug_36025_TEST_FILES = \ 2 | %reldir%/@testclass/one.m \ 3 | %reldir%/@testclass/testclass.m \ 4 | %reldir%/@testclass/two.m \ 5 | %reldir%/bug-36025.tst 6 | 7 | TEST_FILES += $(bug_36025_TEST_FILES) 8 | -------------------------------------------------------------------------------- /test/bug-53956/module.mk: -------------------------------------------------------------------------------- 1 | bug_53956_TEST_FILES = \ 2 | %reldir%/bug-53956.tst \ 3 | %reldir%/bug53956_class_2.m \ 4 | %reldir%/bug53956_class_3.m \ 5 | %reldir%/bug53956_class_4.m 6 | 7 | TEST_FILES += $(bug_53956_TEST_FILES) 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | 10 | [*.{am,mk}] 11 | indent_size = tab 12 | indent_style = tab 13 | -------------------------------------------------------------------------------- /test/bug-53956/bug53956_class_2.m: -------------------------------------------------------------------------------- 1 | classdef bug53956_class_2 < handle 2 | properties 3 | end 4 | methods 5 | function delete (self) 6 | global dtor2_called 7 | dtor2_called++; 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /test/classes/@Blork/get.m: -------------------------------------------------------------------------------- 1 | function v = get (s, propName) 2 | 3 | switch propName 4 | case 'bleek' 5 | v = s.bleek; 6 | otherwise 7 | error ([propName, ' is not a valid Blork property']); 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/classes/@Cork/get.m: -------------------------------------------------------------------------------- 1 | function v = get (s, propName) 2 | 3 | switch propName 4 | case 'click' 5 | v = s.click; 6 | otherwise 7 | error ([propName, ' is not a valid Cork property']); 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/classes/@Snork/get.m: -------------------------------------------------------------------------------- 1 | function v = get (s, propName) 2 | 3 | switch propName 4 | case 'gick' 5 | v = s.gick; 6 | otherwise 7 | error ([propName, ' is not a valid Snork property']); 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/classes/@Spork/get.m: -------------------------------------------------------------------------------- 1 | function v = get (s, propName) 2 | 3 | switch propName 4 | case 'geek' 5 | v = s.geek; 6 | otherwise 7 | error ([propName, ' is not a valid Spork property']); 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/nest/nst1.m: -------------------------------------------------------------------------------- 1 | function fh = nst1 (xval) 2 | if (nargin > 0) 3 | x = xval; 4 | end 5 | fh = @nst; 6 | function r = nst (xval) 7 | if (nargin > 0) 8 | x = xval; 9 | end 10 | r = x; 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /test/nest/script_nest.m: -------------------------------------------------------------------------------- 1 | # script_nest.m 2 | function x = script_nest 3 | A (5) 4 | function A (n) 5 | if n <= 0 6 | script_nest_script; 7 | else 8 | A (n - 1); 9 | endif 10 | endfunction 11 | endfunction 12 | -------------------------------------------------------------------------------- /test/bug-38691/module.mk: -------------------------------------------------------------------------------- 1 | bug_38691_TEST_FILES = \ 2 | %reldir%/bug-38691.tst \ 3 | %reldir%/dir1/func1.m \ 4 | %reldir%/dir2/func1.m \ 5 | %reldir%/dir2/func2.m \ 6 | %reldir%/dir2/func3.m 7 | 8 | TEST_FILES += $(bug_38691_TEST_FILES) 9 | -------------------------------------------------------------------------------- /test/bug-53956/bug53956_class_4.m: -------------------------------------------------------------------------------- 1 | classdef bug53956_class_4 < bug53956_class_3 2 | properties 3 | end 4 | methods 5 | function delete (self) 6 | global dtor4_called 7 | dtor4_called++; 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /examples/code/@polynomial/end.m: -------------------------------------------------------------------------------- 1 | function r = end (obj, index_pos, num_indices) 2 | 3 | if (num_indices != 1) 4 | error ("polynomial object may only have one index"); 5 | endif 6 | 7 | r = length (obj.poly) - 1; 8 | 9 | endfunction 10 | -------------------------------------------------------------------------------- /liboctave/external/blas-xtra/xdznrm2.f: -------------------------------------------------------------------------------- 1 | subroutine xdznrm2 (n, x, incx, retval) 2 | double precision dznrm2, retval 3 | double complex x(*) 4 | integer n, incx 5 | retval = dznrm2 (n, x, incx) 6 | return 7 | end 8 | -------------------------------------------------------------------------------- /liboctave/external/blas-xtra/xsdot.f: -------------------------------------------------------------------------------- 1 | subroutine xsdot (n, dx, incx, dy, incy, retval) 2 | real ddot, dx(*), dy(*), retval, sdot 3 | integer n, incx, incy 4 | retval = sdot (n, dx, incx, dy, incy) 5 | return 6 | end 7 | -------------------------------------------------------------------------------- /test/bug-50014/duplicate_primary_subfunction.m: -------------------------------------------------------------------------------- 1 | ## Test duplicate primary/subfunction name 2 | function r = duplicate_primary_subfunction () 3 | r = 1; 4 | endfunction 5 | 6 | function r = duplicate_primary_subfunction () 7 | r = 2; 8 | endfunction 9 | -------------------------------------------------------------------------------- /liboctave/external/blas-xtra/xddot.f: -------------------------------------------------------------------------------- 1 | subroutine xddot (n, dx, incx, dy, incy, retval) 2 | double precision ddot, dx(*), dy(*), retval 3 | integer n, incx, incy 4 | retval = ddot (n, dx, incx, dy, incy) 5 | return 6 | end 7 | -------------------------------------------------------------------------------- /test/bug-50014/duplicate_nested_parent_function.m: -------------------------------------------------------------------------------- 1 | ## Test nested function that duplicates nested function name 2 | function duplicate_nested_parent_function () 3 | function bug () 4 | function bug () 5 | endfunction 6 | endfunction 7 | endfunction 8 | -------------------------------------------------------------------------------- /test/bug-50014/duplicate_parent_nested_function.m: -------------------------------------------------------------------------------- 1 | ## Test nested function that duplicates nested function name 2 | function duplicate_parent_nested_function () 3 | function bug () 4 | function bug () 5 | endfunction 6 | endfunction 7 | endfunction 8 | -------------------------------------------------------------------------------- /test/classes/@CPrecedenceTester1/CPrecedenceTester1.m: -------------------------------------------------------------------------------- 1 | function x = CPrecedenceTester1 () 2 | 3 | x = struct ('useless_data', pi); 4 | x = class (x, 'CPrecedenceTester1'); 5 | 6 | % don't change anything as far as precedence is concerned 7 | 8 | end 9 | -------------------------------------------------------------------------------- /test/classes/@Sneetch/display.m: -------------------------------------------------------------------------------- 1 | function display ( s ) 2 | 3 | disp ([inputname(1),'.mcbean = ']); 4 | disp (' '); 5 | disp (s.mcbean); 6 | disp ([inputname(1),'.sylvester = ']); 7 | disp (' '); 8 | disp (s.sylvester); 9 | 10 | end 11 | -------------------------------------------------------------------------------- /test/nest/nst3.m: -------------------------------------------------------------------------------- 1 | function fh = nst3 (gval) 2 | global g 3 | if (nargin > 0) 4 | g = gval; 5 | end 6 | fh = @nst; 7 | function r = nst (gval) 8 | if (nargin > 0) 9 | g = gval; 10 | end 11 | r = g; 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/nest/recursive_nest3.m: -------------------------------------------------------------------------------- 1 | function x = recursive_nest3 () 2 | y = 5; 3 | f (y); 4 | x = y; 5 | g (x); 6 | function f (y) 7 | y = 10; 8 | endfunction 9 | 10 | function g (x) 11 | x = 10; 12 | endfunction 13 | endfunction 14 | -------------------------------------------------------------------------------- /test/private-functions/fcn.m: -------------------------------------------------------------------------------- 1 | function retval = fcn () 2 | ## Call private function. 3 | assert (pfcn1 (), "pfcn1"); 4 | ## Execute private script. 5 | a = ""; 6 | ascript; 7 | assert (a, "ascript"); 8 | retval = true; 9 | endfunction 10 | -------------------------------------------------------------------------------- /test/bug-50014/duplicate_primary_nested_function.m: -------------------------------------------------------------------------------- 1 | ## Test duplicate primary/nested function names 2 | function duplicate_primary_nested_function () 3 | 4 | function r = duplicate_primary_nested_function () 5 | r = 1; 6 | endfunction 7 | 8 | endfunction 9 | -------------------------------------------------------------------------------- /test/bug-50716/myclass.m: -------------------------------------------------------------------------------- 1 | classdef myclass < handle 2 | 3 | methods 4 | function obj = myclass 5 | endfunction 6 | 7 | function r = methodA (obj, val) 8 | r = val; 9 | endfunction 10 | 11 | endmethods 12 | 13 | endclassdef 14 | -------------------------------------------------------------------------------- /test/nest/nst2.m: -------------------------------------------------------------------------------- 1 | function fh = nst2 (pval) 2 | persistent p 3 | if (nargin > 0) 4 | p = pval; 5 | end 6 | fh = @nst; 7 | function r = nst (pval) 8 | if (nargin > 0) 9 | p = pval; 10 | end 11 | r = p; 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /examples/code/@polynomial/polyval.m: -------------------------------------------------------------------------------- 1 | function [y, dy] = polyval (p, varargin) 2 | 3 | if (nargout > 1) 4 | [y, dy] = polyval (fliplr (p.poly), varargin{:}); 5 | else 6 | y = polyval (fliplr (p.poly), varargin{:}); 7 | endif 8 | 9 | endfunction 10 | -------------------------------------------------------------------------------- /test/bug-51534/parent_bug51534.m: -------------------------------------------------------------------------------- 1 | classdef parent_bug51534 < handle 2 | properties 3 | prop 4 | endproperties 5 | methods 6 | function self = parent_bug51534 (val) 7 | self.prop = val; 8 | endfunction 9 | endmethods 10 | endclassdef 11 | -------------------------------------------------------------------------------- /test/bug-52722/include_globals.m: -------------------------------------------------------------------------------- 1 | ## Include script globals.m which defines global variables 2 | define_globals 3 | 4 | ## Test for presence of a global variable defined above 5 | if (! isglobal ("c")) 6 | error ("global variable 'c' not defined"); 7 | endif 8 | 9 | -------------------------------------------------------------------------------- /test/ctor-vs-method/@derived/parent.m: -------------------------------------------------------------------------------- 1 | function r = parent (a) 2 | __trace__ ('begin derived/parent'); 3 | if (isa (a, 'parent')) 4 | r = parent (a.parent); 5 | else 6 | error ('foo'); 7 | end 8 | __trace__ ('end derived/parent'); 9 | end 10 | -------------------------------------------------------------------------------- /liboctave/external/dassl/module.mk: -------------------------------------------------------------------------------- 1 | EXTERNAL_SOURCES += \ 2 | %reldir%/ddaini.f \ 3 | %reldir%/ddajac.f \ 4 | %reldir%/ddanrm.f \ 5 | %reldir%/ddaslv.f \ 6 | %reldir%/ddassl.f \ 7 | %reldir%/ddastp.f \ 8 | %reldir%/ddatrp.f \ 9 | %reldir%/ddawts.f 10 | -------------------------------------------------------------------------------- /test/nest/varg_nest.m: -------------------------------------------------------------------------------- 1 | function x = varg_nest (varargin) 2 | x = abs (f (-5)) + g; 3 | 4 | function x = f (varargin) 5 | x = abs (varargin{1}); 6 | endfunction 7 | 8 | function x = g 9 | x = abs (varargin{1}); 10 | endfunction 11 | endfunction 12 | -------------------------------------------------------------------------------- /test/nest/varg_nest2.m: -------------------------------------------------------------------------------- 1 | function x = varg_nest2 2 | [a, b] = f; 3 | x = a; 4 | 5 | if nargout == 1 6 | x = a; 7 | endif 8 | 9 | function [a, b] = f 10 | if nargout == 2 11 | a = b = 5; 12 | endif 13 | endfunction 14 | endfunction 15 | -------------------------------------------------------------------------------- /liboctave/external/blas-xtra/xcdotc.f: -------------------------------------------------------------------------------- 1 | subroutine xcdotc (n, zx, incx, zy, incy, retval) 2 | complex cdotc, zx(*), zy(*), retval 3 | integer n, incx, incy 4 | external cdotc 5 | retval = cdotc (n, zx, incx, zy, incy) 6 | return 7 | end 8 | -------------------------------------------------------------------------------- /liboctave/external/blas-xtra/xcdotu.f: -------------------------------------------------------------------------------- 1 | subroutine xcdotu (n, zx, incx, zy, incy, retval) 2 | complex cdotu, zx(*), zy(*), retval 3 | integer n, incx, incy 4 | external cdotu 5 | retval = cdotu (n, zx, incx, zy, incy) 6 | return 7 | end 8 | -------------------------------------------------------------------------------- /test/nest/scope0.m: -------------------------------------------------------------------------------- 1 | # scope0.m 2 | function scope0 3 | C; 4 | function A 5 | B; 6 | function B 7 | endfunction 8 | endfunction 9 | 10 | function C 11 | D; 12 | function D 13 | A; 14 | endfunction 15 | endfunction 16 | endfunction 17 | -------------------------------------------------------------------------------- /liboctave/external/blas-xtra/xzdotc.f: -------------------------------------------------------------------------------- 1 | subroutine xzdotc (n, zx, incx, zy, incy, retval) 2 | double complex zdotc, zx(*), zy(*), retval 3 | integer n, incx, incy 4 | external zdotc 5 | retval = zdotc (n, zx, incx, zy, incy) 6 | return 7 | end 8 | -------------------------------------------------------------------------------- /liboctave/external/blas-xtra/xzdotu.f: -------------------------------------------------------------------------------- 1 | subroutine xzdotu (n, zx, incx, zy, incy, retval) 2 | double complex zdotu, zx(*), zy(*), retval 3 | integer n, incx, incy 4 | external zdotu 5 | retval = zdotu (n, zx, incx, zy, incy) 6 | return 7 | end 8 | -------------------------------------------------------------------------------- /test/bug-50014/duplicate_subfunction_old_syntax.m: -------------------------------------------------------------------------------- 1 | ## Test old-style subfunctions with no END statements. 2 | 3 | function r = duplicate_subfunction_old_syntax () 4 | r = 0; 5 | bug (); 6 | 7 | function r = bug () 8 | r = 1 9 | 10 | function r = bug () 11 | r = 2 12 | -------------------------------------------------------------------------------- /test/local-functions/local_function_eval.m: -------------------------------------------------------------------------------- 1 | function status = local_function_eval () 2 | eval ("y = 5;"); 3 | status = local_fcn ("y = 6;"); 4 | endfunction 5 | 6 | function status = local_fcn (expr) 7 | eval (expr); 8 | status = exist ("y", "var"); 9 | endfunction 10 | -------------------------------------------------------------------------------- /liboctave/external/lapack-xtra/xslange.f: -------------------------------------------------------------------------------- 1 | subroutine xslange (norm, m, n, a, lda, work, retval) 2 | character norm 3 | integer lda, m, n 4 | real a (lda, *), work (*), slange, retval 5 | retval = slange (norm, m, n, a, lda, work) 6 | return 7 | end 8 | -------------------------------------------------------------------------------- /liboctave/external/lapack-xtra/xilaenv.f: -------------------------------------------------------------------------------- 1 | subroutine xilaenv (ispec, name, opts, n1, n2, n3, n4, retval) 2 | character*(*) name, opts 3 | integer ilaenv, ispec, n1, n2, n3, n4, retval 4 | retval = ilaenv (ispec, name, opts, n1, n2, n3, n4) 5 | return 6 | end 7 | -------------------------------------------------------------------------------- /test/bug-53027/module.mk: -------------------------------------------------------------------------------- 1 | bug_53027_TEST_FILES = \ 2 | %reldir%/bug-53027.tst \ 3 | %reldir%/globals53027.m \ 4 | %reldir%/gtest53027.m \ 5 | %reldir%/ntest53027a.m \ 6 | %reldir%/ntest53027b.m \ 7 | %reldir%/ntest53027c.m 8 | 9 | TEST_FILES += $(bug_53027_TEST_FILES) 10 | -------------------------------------------------------------------------------- /test/nest/scope2.m: -------------------------------------------------------------------------------- 1 | # scope2.m 2 | function scope2 3 | C; 4 | function A 5 | B; 6 | function B 7 | D; 8 | endfunction 9 | endfunction 10 | 11 | function C 12 | D; 13 | function D 14 | A; 15 | endfunction 16 | endfunction 17 | endfunction 18 | -------------------------------------------------------------------------------- /libgui/qterminal/msvc.pri: -------------------------------------------------------------------------------- 1 | CONFIG += release 2 | 3 | QMAKE_CXXFLAGS += -MP 4 | LIBDIR_SUFFIX = release 5 | 6 | msvc-debug { 7 | QMAKE_CXXFLAGS_RELEASE += -Zi 8 | QMAKE_CXXFLAGS_RELEASE -= -O2 9 | QMAKE_LFLAGS_RELEASE += -debug 10 | QMAKE_CLEAN += $(DESTDIR)$(QMAKE_TARGET).pdb 11 | } 12 | -------------------------------------------------------------------------------- /test/bug-50014/duplicate_subfunction.m: -------------------------------------------------------------------------------- 1 | ## Test duplicate subfunctions 2 | function x = duplicate_subfunction () 3 | x = 1; 4 | endfunction 5 | 6 | function y = duplicate_subfcn_1 () 7 | y = 2; 8 | endfunction 9 | 10 | function z = duplicate_subfcn_1 () 11 | z = 3; 12 | endfunction 13 | -------------------------------------------------------------------------------- /test/classdef/class_bug52614A.m: -------------------------------------------------------------------------------- 1 | classdef class_bug52614A < handle 2 | properties 3 | a 4 | end 5 | 6 | methods 7 | function obj = class_bug52614A () 8 | obj.foo (); 9 | end 10 | 11 | function foo (obj) 12 | obj.a = 1; 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /liboctave/external/lapack-xtra/xdlange.f: -------------------------------------------------------------------------------- 1 | subroutine xdlange (norm, m, n, a, lda, work, retval) 2 | character norm 3 | integer lda, m, n 4 | double precision a (lda, *), work (*), dlange, retval 5 | retval = dlange (norm, m, n, a, lda, work) 6 | return 7 | end 8 | -------------------------------------------------------------------------------- /test/bug-50014/duplicate_nested_function.m: -------------------------------------------------------------------------------- 1 | ## Test duplicate nested function names 2 | function duplicate_nested_function () 3 | 4 | function r = nested_fcn_1 () 5 | r = 1; 6 | endfunction 7 | 8 | function r = nested_fcn_1 () 9 | r = 2; 10 | endfunction 11 | 12 | endfunction 13 | -------------------------------------------------------------------------------- /test/mex/bug_51725.c: -------------------------------------------------------------------------------- 1 | #include "mex.h" 2 | 3 | void mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) 4 | { 5 | if (nlhs > 0) 6 | plhs[0] = mxCreateDoubleMatrix (0, 0, mxREAL); 7 | 8 | if (nlhs > 2) 9 | plhs[2] = mxCreateDoubleMatrix (0, 0, mxREAL); 10 | } 11 | -------------------------------------------------------------------------------- /test/nest/recursive_nest.m: -------------------------------------------------------------------------------- 1 | # recursive_nest.m 2 | function x = recursive_nest () 3 | global recursive_nest_inc = 1 4 | x = 5; 5 | f (20); 6 | 7 | function f (n) 8 | if n > 0 9 | x = x + recursive_nest_inc; 10 | f (n - 1); 11 | end 12 | endfunction 13 | endfunction 14 | -------------------------------------------------------------------------------- /test/bug-53027/ntest53027a.m: -------------------------------------------------------------------------------- 1 | function [m_exist, n_exist] = ntest53027a () 2 | global x 3 | x = 3; 4 | n_exist = nest (); 5 | m_exist = exist ("x", 'var'); 6 | function n_exist = nest () 7 | x = 1; 8 | clear x 9 | n_exist = exist ("x", "var"); 10 | endfunction 11 | endfunction 12 | -------------------------------------------------------------------------------- /liboctave/external/lapack-xtra/module.mk: -------------------------------------------------------------------------------- 1 | EXTERNAL_SOURCES += \ 2 | %reldir%/xclange.f \ 3 | %reldir%/xdlamch.f \ 4 | %reldir%/xdlange.f \ 5 | %reldir%/xilaenv.f \ 6 | %reldir%/xslamch.f \ 7 | %reldir%/xslange.f \ 8 | %reldir%/xzlange.f \ 9 | %reldir%/zrsf2csf.f \ 10 | %reldir%/crsf2csf.f 11 | -------------------------------------------------------------------------------- /test/classes/@Cork/Cork.m: -------------------------------------------------------------------------------- 1 | function s = Cork (click) 2 | % Test class. 3 | 4 | if (nargin == 1 && isa (click, 'Cork')) 5 | s = click; 6 | return; 7 | end 8 | 9 | if (nargin < 1) 10 | s.click = 1; 11 | else 12 | s.click = click; 13 | end 14 | s = class (s, 'Cork'); 15 | 16 | end 17 | -------------------------------------------------------------------------------- /test/publish/module.mk: -------------------------------------------------------------------------------- 1 | publish_TEST_FILES = \ 2 | %reldir%/publish.tst \ 3 | %reldir%/test_script.m \ 4 | %reldir%/test_script_code_only.m \ 5 | %reldir%/test_script_empty.m \ 6 | %reldir%/test_script_example.m \ 7 | %reldir%/test_script_head_only.m 8 | 9 | TEST_FILES += $(publish_TEST_FILES) 10 | -------------------------------------------------------------------------------- /doc/doxyhtml/DoxyfileQt.patch: -------------------------------------------------------------------------------- 1 | 2 | # The following lines are used to create a minimal version to be used 3 | # as documentation within the GNU Octave GUI widget Qt Assistant. 4 | 5 | HTML_OUTPUT = doxyhtml/doxyqt 6 | HAVE_DOT = NO 7 | GENERATE_TREEVIEW = NO 8 | SEARCHENGINE = NO 9 | -------------------------------------------------------------------------------- /examples/code/addtwomatrices.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | DEFUN_DLD (addtwomatrices, args, , "Add A to B") 4 | { 5 | if (args.length () != 2) 6 | print_usage (); 7 | 8 | NDArray A = args(0).array_value (); 9 | NDArray B = args(1).array_value (); 10 | 11 | return octave_value (A + B); 12 | } 13 | -------------------------------------------------------------------------------- /liboctave/octave.in.pc: -------------------------------------------------------------------------------- 1 | Name: @PACKAGE_NAME@ 2 | Description: C++ interface to GNU Octave underlying library. 3 | URL: https://www.octave.org 4 | Version: @PACKAGE_VERSION@ 5 | Requires: 6 | Requires.private: 7 | Libs: -L@octlibdir@ @LIBOCTAVE@ 8 | Libs.private: @LIBOCTAVE_LINK_DEPS@ 9 | Cflags: -I@octincludedir@/.. 10 | -------------------------------------------------------------------------------- /test/classes/@Blork/Blork.m: -------------------------------------------------------------------------------- 1 | function s = Blork (bleek) 2 | % Test class. 3 | 4 | if (nargin == 1 && isa (bleek, 'Blork')) 5 | s = bleek; 6 | else 7 | if (nargin == 0) 8 | s.bleek = 1; 9 | else 10 | s.bleek = bleek; 11 | end 12 | s = class (s, 'Blork'); 13 | end 14 | 15 | end 16 | -------------------------------------------------------------------------------- /test/private-functions/module.mk: -------------------------------------------------------------------------------- 1 | private_functions_TEST_FILES = \ 2 | %reldir%/fcn.m \ 3 | %reldir%/private-functions.tst \ 4 | %reldir%/private/ascript.m \ 5 | %reldir%/private/bscript.m \ 6 | %reldir%/private/pfcn1.m \ 7 | %reldir%/private/pfcn2.m 8 | 9 | TEST_FILES += $(private_functions_TEST_FILES) 10 | -------------------------------------------------------------------------------- /libinterp/octinterp.in.pc: -------------------------------------------------------------------------------- 1 | Name: @PACKAGE_NAME@ 2 | Description: C++ interface to GNU Octave interpreter. 3 | URL: https://www.octave.org 4 | Version: @PACKAGE_VERSION@ 5 | Requires: octave = @PACKAGE_VERSION@ 6 | Requires.private: 7 | Libs: -L@octlibdir@ @LIBOCTINTERP@ 8 | Libs.private: 9 | Cflags: -I@octincludedir@/.. 10 | -------------------------------------------------------------------------------- /test/bug-52075/class_bug52075.m: -------------------------------------------------------------------------------- 1 | classdef class_bug52075 2 | methods 3 | function ret = duplicate (self) 4 | ret = 'method'; 5 | end 6 | function ret = call_local_dup (self) 7 | ret = duplicate (); 8 | end 9 | end 10 | end 11 | 12 | function ret = duplicate 13 | ret = 'local_foo'; 14 | end 15 | -------------------------------------------------------------------------------- /test/nest/scope3.m: -------------------------------------------------------------------------------- 1 | # scope3.m 2 | function scope3 3 | C; 4 | function A 5 | B; 6 | function B 7 | E; 8 | endfunction 9 | function E 10 | endfunction 11 | endfunction 12 | 13 | function C 14 | D; 15 | function D 16 | A; 17 | endfunction 18 | endfunction 19 | endfunction 20 | -------------------------------------------------------------------------------- /scripts/startup/site-rcfile: -------------------------------------------------------------------------------- 1 | ## System-wide startup file for Octave. 2 | ## 3 | ## If the environment variable OCTAVE_SITE_INITFILE is set when Octave 4 | ## starts, then that file is executed instead of this file. 5 | ## 6 | ## This file contain commands that should be executed each time Octave starts 7 | ## for every user at this site. 8 | -------------------------------------------------------------------------------- /test/bug-47680/bug-47680.tst: -------------------------------------------------------------------------------- 1 | %!shared obj 2 | %! obj = sub_bug47680 ("foo"); 3 | %!assert<*47680> (obj.meth1 (), "foo:super:meth1:sub:meth1") 4 | %!assert<*47680> (obj.meth2 (), "foo:super:meth2:sub:meth2") 5 | %!assert<*47680> (obj.meth3 (), "foo:super:meth3:sub:meth3") 6 | %!assert<*47680> (obj.meth4 (), "foo:super:meth4:sub:meth4") 7 | -------------------------------------------------------------------------------- /test/bug-50831/bug-50831.tst: -------------------------------------------------------------------------------- 1 | %!test 2 | %! filename = "save-text.var"; 3 | %! s.("a-b") = "bad fieldname"; 4 | %! unwind_protect 5 | %! save ("-text", filename, "s"); 6 | %! filevar = load (filename); 7 | %! assert (filevar.s, s); 8 | %! unwind_protect_cleanup 9 | %! sts = unlink (filename); 10 | %! end_unwind_protect 11 | -------------------------------------------------------------------------------- /test/classdef-multiple-inheritance/module.mk: -------------------------------------------------------------------------------- 1 | classdef_multiple_inheritance_TEST_FILES = \ 2 | %reldir%/base_1.m \ 3 | %reldir%/base_2.m \ 4 | %reldir%/child_from_base_1.m \ 5 | %reldir%/child_from_base_1_and_2.m \ 6 | %reldir%/classdef-multiple-inheritance.tst 7 | 8 | TEST_FILES += $(classdef_multiple_inheritance_TEST_FILES) 9 | -------------------------------------------------------------------------------- /test/bug-49379/bug-49379.tst: -------------------------------------------------------------------------------- 1 | %!test <49379> 2 | %! a1 = 1; 3 | %! a2 = 2; 4 | %! obj = class_bug49379 (a1, a2); 5 | %! assert (obj.ctor_arg_names (), {"a1", "a2"}) 6 | %! meth (obj, a2, a1); 7 | %! assert (obj.meth_arg_names (), {"obj", "a2", "a1"}) 8 | %! obj.meth (a2, a1); 9 | %! assert (obj.meth_arg_names (), {"obj", "a2", "a1"}) 10 | -------------------------------------------------------------------------------- /test/bug-50014/duplicate_primary_subfunction_old_syntax.m: -------------------------------------------------------------------------------- 1 | ## Test old-style subfunctions with no END statements 2 | 3 | function r = duplicate_primary_subfunction_old_syntax () 4 | r = 0; 5 | notbug (); 6 | 7 | function r = notbug () 8 | r = 1 9 | 10 | function r = duplicate_primary_subfunction_old_syntax () 11 | r = 2 12 | -------------------------------------------------------------------------------- /test/classes/@Dork/display.m: -------------------------------------------------------------------------------- 1 | function display (s) 2 | % Display the critical info for an amplifier 3 | 4 | gick = get (s, 'gick'); 5 | disp ([inputname(1),'.gick = ']); 6 | disp (' '); 7 | disp (gick); 8 | disp (' '); 9 | disp ([inputname(1),'.gack = ']); 10 | disp (' '); 11 | disp (s.gack); 12 | 13 | end 14 | -------------------------------------------------------------------------------- /test/classes/@Pork/display.m: -------------------------------------------------------------------------------- 1 | function display (s) 2 | % Display the critical info for an amplifier 3 | 4 | geek = get (s, 'geek'); 5 | disp ([inputname(1),'.geek = ']); 6 | disp (' '); 7 | disp (geek); 8 | disp (' '); 9 | disp ([inputname(1),'.gurk = ']); 10 | disp (' '); 11 | disp (s.gurk); 12 | 13 | end 14 | -------------------------------------------------------------------------------- /test/fcn-handle/bug51709_c.m: -------------------------------------------------------------------------------- 1 | classdef bug51709_c 2 | methods 3 | function out = meth (varargin) 4 | out = {"meth", varargin}; 5 | endfunction 6 | endmethods 7 | methods (Static) 8 | function out = smeth (varargin) 9 | out = {"smeth", varargin}; 10 | endfunction 11 | endmethods 12 | endclassdef 13 | -------------------------------------------------------------------------------- /doc/interpreter/images: -------------------------------------------------------------------------------- 1 | geometryimages.m voronoi triplot griddata convhull delaunay inpolygon 2 | interpimages.m interpft interpn interpderiv1 interpderiv2 3 | plotimages.m plot hist errorbar polar mesh plot3 extended 4 | sparseimages.m gplot grid spmatrix spchol spcholperm 5 | splineimages.m splinefit1 splinefit2 splinefit3 splinefit4 splinefit6 6 | -------------------------------------------------------------------------------- /test/classes/@Snork/Snork.m: -------------------------------------------------------------------------------- 1 | function s = Snork (gick) 2 | % Test class. 3 | 4 | if (nargin == 1 && isa (gick, 'Snork')) 5 | s = gick; 6 | else 7 | s.cack = [0 1 2 3]; 8 | if (nargin == 0) 9 | s.gick = 1; 10 | else 11 | s.gick = gick; 12 | end 13 | s = class (s, 'Snork'); 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /test/mex/mexnumtst.tst: -------------------------------------------------------------------------------- 1 | %!test 2 | %! s = rand (3, 4, "single"); 3 | %! sc = s + i * rand (3, 4, "single"); 4 | %! d = rand (3, 4, "double"); 5 | %! dc = d + i * rand (3, 4, "double"); 6 | %! 7 | %! [sx, scx, dx, dcx] = mexnumtst (s, sc, d, dc); 8 | %! assert (s, sx) 9 | %! assert (sc, scx) 10 | %! assert (d, dx) 11 | %! assert (dc, dcx) 12 | -------------------------------------------------------------------------------- /test/nest/scope1.m: -------------------------------------------------------------------------------- 1 | # scope1.m 2 | function scope1 (n) 3 | value = n; 4 | if value 5 | C; 6 | end 7 | function A 8 | B; 9 | function B 10 | scope1 (0); 11 | endfunction 12 | endfunction 13 | 14 | function C 15 | D; 16 | function D 17 | A; 18 | endfunction 19 | endfunction 20 | endfunction 21 | -------------------------------------------------------------------------------- /examples/code/@polynomial/plot.m: -------------------------------------------------------------------------------- 1 | function h = plot (p, varargin) 2 | 3 | n = 128; 4 | rmax = max (abs (roots (p.poly))); 5 | x = [0 : (n - 1)] / (n - 1) * 2.2 * rmax - 1.1 * rmax; 6 | if (nargout > 0) 7 | h = plot (x, polyval (p, x), varargin{:}); 8 | else 9 | plot (x, polyval (p, x), varargin{:}); 10 | endif 11 | 12 | endfunction 13 | -------------------------------------------------------------------------------- /test/classdef/class_bug52614B.m: -------------------------------------------------------------------------------- 1 | classdef class_bug52614B < class_bug52614A 2 | properties 3 | b 4 | end 5 | 6 | methods 7 | function obj = class_bug52614B () 8 | obj = obj@class_bug52614A (); 9 | end 10 | 11 | function foo (obj) 12 | foo@class_bug52614A (obj); 13 | obj.b = 2; 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /test/classes/@Gork/Gork.m: -------------------------------------------------------------------------------- 1 | function s = Gork (g) 2 | 3 | if (nargin == 1 && isa (g, 'Gork')) 4 | s = sprk; 5 | return; 6 | end 7 | 8 | drk = Dork (); 9 | prk = Pork (); 10 | blrk = Blork (); 11 | s.Cork = Cork (17); % Aggregation. 12 | s.gark = -2; 13 | s.gyrk = -3; 14 | s = class (s,'Gork',drk,prk,blrk); 15 | 16 | end 17 | -------------------------------------------------------------------------------- /test/bug-38236/u_vr.m: -------------------------------------------------------------------------------- 1 | # u_vr.m 2 | 3 | ## define and exectute "__demo__" once 4 | eval ("function __demo__ (); df_vr; v = vr * 2; endfunction"); 5 | __demo__; 6 | 7 | ## clear definition of "__demo__" 8 | clear __demo__ 9 | 10 | ## define and exectute "__demo__" once more 11 | eval ("function __demo__ (); df_vr; v = vr * 2; endfunction"); 12 | __demo__; 13 | -------------------------------------------------------------------------------- /test/bug-38691/dir1/func1.m: -------------------------------------------------------------------------------- 1 | function [r, f1, f2, f3] = func1 (x) 2 | f1 = "dir1/func1"; 3 | [r, f2, f3] = feval ("func2", x); 4 | endfunction 5 | 6 | function [r, f2, f3] = func2 (x) 7 | f2 = "dir1/func2"; 8 | [r, f3] = feval ("func3", x); 9 | endfunction 10 | 11 | function [r, f3] = func3 (x) 12 | f3 = "dir1/func3"; 13 | r = x; 14 | endfunction 15 | -------------------------------------------------------------------------------- /test/classes/@Spork/Spork.m: -------------------------------------------------------------------------------- 1 | function s = Spork (geek) 2 | % Test class. 3 | 4 | if (nargin == 1 && isa (geek, 'Spork')) 5 | s = geek; 6 | else 7 | s.cack = [-1 -2 -3 -4]; 8 | if (nargin == 0) 9 | s.geek = 1; 10 | else 11 | s.geek = geek; 12 | end 13 | s = class (s, 'Spork'); 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /test/bug-50014/duplicate_parent_nested2.m: -------------------------------------------------------------------------------- 1 | ## Test that we detect the correct error. 2 | function duplicate_parent_nested2 () 3 | function notbug () 4 | function bug () 5 | endfunction 6 | endfunction 7 | function bug () ## no error here 8 | function bug () ## error here (duplicates parent name) 9 | endfunction 10 | endfunction 11 | endfunction 12 | -------------------------------------------------------------------------------- /test/bug-54490.tst: -------------------------------------------------------------------------------- 1 | %!function out = bug54490 () 2 | %! global k; 3 | %! k = 1; 4 | %! out = 3; 5 | %!endfunction 6 | 7 | %!test 8 | %! global k; 9 | %! k = 2; 10 | %! a = [5, 6]; 11 | %! a(k) = bug54490 (); 12 | %! assert (a, [5, 3]); 13 | %! k = 2; 14 | %! a = [5, 6]; 15 | %! [a(k)] = bug54490 (); 16 | %! assert (a, [5, 3]); 17 | %! clear -global k; # cleanup after test 18 | -------------------------------------------------------------------------------- /test/classes/@Sneetch/Sneetch.m: -------------------------------------------------------------------------------- 1 | function s = Sneetch (mcbean) 2 | % Test class: should produce error. 3 | 4 | if (nargin == 1 && isa (mcbean, 'Sneetch')) 5 | s = mcbean; 6 | else 7 | if (nargin == 0) 8 | s.mcbean = 1; 9 | else 10 | s.mcbean = mcbean; 11 | end 12 | s = class (s, 'Sneetch'); 13 | s.sylvester = 1; 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /scripts/+containers/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += %reldir% 2 | 3 | %canon_reldir%_FCN_FILES = \ 4 | %reldir%/Map.m 5 | 6 | %canon_reldir%dir = $(fcnfiledir)/+containers 7 | 8 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 9 | 10 | FCN_FILES += $(%canon_reldir%_FCN_FILES) 11 | 12 | PKG_ADD_FILES += %reldir%/PKG_ADD 13 | 14 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 15 | -------------------------------------------------------------------------------- /scripts/deprecated/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += %reldir% 2 | 3 | %canon_reldir%_FCN_FILES = \ 4 | %reldir%/runtests.m 5 | 6 | %canon_reldir%dir = $(fcnfiledir)/deprecated 7 | 8 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 9 | 10 | FCN_FILES += $(%canon_reldir%_FCN_FILES) 11 | 12 | PKG_ADD_FILES += %reldir%/PKG_ADD 13 | 14 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 15 | -------------------------------------------------------------------------------- /test/ctor-vs-method/module.mk: -------------------------------------------------------------------------------- 1 | ctor_vs_method_TEST_FILES = \ 2 | %reldir%/@derived/derived.m \ 3 | %reldir%/@derived/parent.m \ 4 | %reldir%/@other/other.m \ 5 | %reldir%/@other/parent.m \ 6 | %reldir%/@parent/method.m \ 7 | %reldir%/@parent/parent.m \ 8 | %reldir%/__trace__.m \ 9 | %reldir%/ctor-vs-method.tst 10 | 11 | TEST_FILES += $(ctor_vs_method_TEST_FILES) 12 | -------------------------------------------------------------------------------- /etc/PROJECTS: -------------------------------------------------------------------------------- 1 | Octave PROJECTS 2 | =============== 3 | 4 | A list of proposed projects is maintained at: 5 | 6 | https://wiki.octave.org/Projects 7 | 8 | If you start working steadily on a project, please let 9 | maintainers@octave.org know. We might have information that could help 10 | you. You should also read the Contributing Guidelines chapter in the 11 | Octave manual. 12 | -------------------------------------------------------------------------------- /examples/code/myfunc.c: -------------------------------------------------------------------------------- 1 | #include "mex.h" 2 | 3 | void 4 | mexFunction (int nlhs, mxArray *plhs[], 5 | int nrhs, const mxArray *prhs[]) 6 | { 7 | const char *nm; 8 | 9 | nm = mexFunctionName (); 10 | mexPrintf ("You called function: %s\n", nm); 11 | if (strcmp (nm, "myfunc") == 0) 12 | mexPrintf ("This is the principal function\n", nm); 13 | 14 | return; 15 | } 16 | -------------------------------------------------------------------------------- /libgui/qterminal/libqterminal/README: -------------------------------------------------------------------------------- 1 | lib.pro is a *.pro-file for qmake 2 | 3 | It produces static lib (libqtermwidget.a) only. 4 | For creating shared lib (*.so) uncomment "dll" in "CONFIG" line in *.pro-file 5 | 6 | Library was tested both with HAVE_POSIX_OPENPT and HAVE_GETPT precompiler directives, 7 | defined in "DEFINES" line. You should select variant which would be correct for your system. 8 | -------------------------------------------------------------------------------- /test/classes/@Gork/display.m: -------------------------------------------------------------------------------- 1 | function display (s) 2 | % Display the critical info for a Gork. 3 | 4 | dork_base = s.Dork 5 | %pork_base = s.Pork 6 | %sprk = s.sprk; 7 | gark = get (s, 'gark'); 8 | disp ([inputname(1),'.gark = ']); 9 | disp (' '); 10 | disp (gark); 11 | disp ([inputname(1),'.Cork= ']); 12 | disp (' '); 13 | disp (click(s.Cork)); 14 | 15 | end 16 | -------------------------------------------------------------------------------- /test/classes/@Gork/get.m: -------------------------------------------------------------------------------- 1 | function v = get (s, propName) 2 | 3 | switch propName 4 | case 'cork' 5 | v = s.Cork; 6 | case 'gark' 7 | v = s.gark; 8 | otherwise 9 | % Note that get/set for multiple parents is hard. We only do one 10 | % branch of the parent tree just to test this stuff out. 11 | v = get (s.Dork,propName); 12 | end 13 | 14 | end 15 | -------------------------------------------------------------------------------- /libgui/qterminal/qterminal/qterminal.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | 3 | QT += core gui 4 | 5 | SOURCES = main.cpp 6 | INCLUDEPATH = ../libqterminal 7 | 8 | win32 { 9 | win32-msvc*: include(../msvc.pri) 10 | LIBS += -L../libqterminal/$$LIBDIR_SUFFIX \ 11 | -lqterminal -luser32 -lkernel32 12 | } else { 13 | DEFINES += HAVE_PTY_H HAVE_OPENPTY 14 | LIBS += -L../libqterminal -lqterminal -lutil 15 | } 16 | -------------------------------------------------------------------------------- /test/classdef/foo_method_changes_property_size.m: -------------------------------------------------------------------------------- 1 | classdef foo_method_changes_property_size 2 | properties 3 | element; 4 | end 5 | methods 6 | function obj = foo_method_changes_property_size (n) 7 | obj.element = 1:n; 8 | end 9 | function obj = move_element_to_end (obj, n) 10 | obj.element(end+1) = obj.element(n); 11 | obj.element(n) = []; 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /test/classes/@Dork/Dork.m: -------------------------------------------------------------------------------- 1 | function s = Dork (gick, gack) 2 | 3 | if (nargin == 1 && isa (gick, 'Dork')) 4 | s = gick; 5 | else 6 | s.gack = 0; 7 | if (nargin == 0) 8 | s0 = Snork (); 9 | elseif (nargin == 1) 10 | s0 = Snork (gick); 11 | else 12 | s0 = Snork (gick); 13 | s.gack = gack; 14 | end 15 | s = class (s, 'Dork', s0); 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /test/pkg/mfile_basic_test/DESCRIPTION: -------------------------------------------------------------------------------- 1 | Name: mfile_basic_test 2 | Version: 0.1.0 3 | Date: 2017-12-07 4 | Author: hopefully various authors 5 | Maintainer: hopefully some of those authors. 6 | Title: Basic Example Package 7 | Description: Basic package structure with only m-files. 8 | Depends: octave (>= 4.2.1) 9 | License: GPLv3+ 10 | # BuildRequires: 11 | # SystemRequirements: 12 | # Url: external homepage 13 | -------------------------------------------------------------------------------- /test/ctor-vs-method/__trace__.m: -------------------------------------------------------------------------------- 1 | function r = __trace__ (t) 2 | persistent history 3 | 4 | if (isempty (history)) 5 | history = {}; 6 | end 7 | if (nargin == 0) 8 | if (nargout == 0) 9 | history = {}; 10 | else 11 | r = history; 12 | end 13 | elseif (nargin == 1); 14 | history = [history; t]; 15 | else 16 | error ('incorrect call to __trace__'); 17 | end 18 | 19 | end 20 | -------------------------------------------------------------------------------- /test/nest/recursive_nest2.m: -------------------------------------------------------------------------------- 1 | # recursive_nest2.m 2 | function x = recursive_nest2 () 3 | x = B (20); 4 | function v = B (n) 5 | Y = 0; 6 | BB (n); 7 | C; 8 | v = Y; 9 | function BB (m) 10 | if m > 0 11 | Y = Y + 1; 12 | BB(m - 1); 13 | C; 14 | end 15 | endfunction 16 | endfunction 17 | 18 | function C 19 | Y = 0; 20 | endfunction 21 | endfunction 22 | -------------------------------------------------------------------------------- /liboctave/external/slatec-err/module.mk: -------------------------------------------------------------------------------- 1 | EXTERNAL_SOURCES += \ 2 | %reldir%/fdump.f \ 3 | %reldir%/ixsav.f \ 4 | %reldir%/j4save.f \ 5 | %reldir%/xerclr.f \ 6 | %reldir%/xercnt.f \ 7 | %reldir%/xerhlt.f \ 8 | %reldir%/xermsg.f \ 9 | %reldir%/xerprn.f \ 10 | %reldir%/xerrwd.f \ 11 | %reldir%/xersve.f \ 12 | %reldir%/xgetf.f \ 13 | %reldir%/xgetua.f \ 14 | %reldir%/xsetf.f \ 15 | %reldir%/xsetua.f 16 | -------------------------------------------------------------------------------- /test/classes/@Dork/set.m: -------------------------------------------------------------------------------- 1 | function s = set (s, varargin) 2 | 3 | propArgs = varargin; 4 | while (length (propArgs) >= 2) 5 | propName = propArgs{1}; 6 | propValue = propArgs{2}; 7 | propArgs = propArgs(3:end); 8 | switch propName 9 | case 'gack' 10 | s.gack = propValue; 11 | otherwise 12 | s.Snork = set (s.Snork, propName, propValue); 13 | end 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /test/classes/@Pork/set.m: -------------------------------------------------------------------------------- 1 | function s = set (s, varargin) 2 | 3 | propArgs = varargin; 4 | while (length (propArgs) >= 2) 5 | propName = propArgs{1}; 6 | propValue = propArgs{2}; 7 | propArgs = propArgs(3:end); 8 | switch propName 9 | case 'gurk' 10 | s.gurk = propValue; 11 | otherwise 12 | s.Spork = set (s.Spork, propName, propValue); 13 | end 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /test/nest/no_closure.m: -------------------------------------------------------------------------------- 1 | # no_closure.m 2 | function r = no_closure (n) 3 | if (ischar (n)) 4 | r = nested (n); 5 | else 6 | if (n == 0) 7 | r = @no_closure; 8 | elseif (n == 1) 9 | r = @nested; 10 | endif 11 | endif 12 | function r = nested (x) 13 | if (nargin == 1) 14 | r = ["nested ", x]; 15 | else 16 | r = "nested"; 17 | endif 18 | endfunction 19 | endfunction 20 | -------------------------------------------------------------------------------- /test/publish/test_script_example.m: -------------------------------------------------------------------------------- 1 | %% Headline title 2 | % 3 | % Some *bold*, _italic_, or |monospaced| Text with 4 | % a . 5 | %% 6 | 7 | # "Real" Octave commands to be evaluated 8 | sombrero () 9 | 10 | ## Octave comment style supported as well 11 | # 12 | # * Bulleted list item 1 13 | # * Bulleted list item 2 14 | # 15 | # # Numbered list item 1 16 | # # Numbered list item 2 17 | -------------------------------------------------------------------------------- /examples/code/myhello.c: -------------------------------------------------------------------------------- 1 | #include "mex.h" 2 | 3 | void 4 | mexFunction (int nlhs, mxArray *plhs[], 5 | int nrhs, const mxArray *prhs[]) 6 | { 7 | mexPrintf ("Hello, World!\n"); 8 | 9 | mexPrintf ("I have %d inputs and %d outputs\n", nrhs, nlhs); 10 | 11 | /* Return empty matrices for any outputs */ 12 | int i; 13 | for (i = 0; i < nlhs; i++) 14 | plhs[i] = mxCreateDoubleMatrix (0, 0, mxREAL); 15 | } 16 | -------------------------------------------------------------------------------- /scripts/+matlab/+lang/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += %reldir% 2 | 3 | %canon_reldir%_FCN_FILES = \ 4 | %reldir%/makeUniqueStrings.m \ 5 | %reldir%/makeValidName.m 6 | 7 | %canon_reldir%dir = $(fcnfiledir)/+matlab/+lang 8 | 9 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 10 | 11 | FCN_FILES += $(%canon_reldir%_FCN_FILES) 12 | 13 | PKG_ADD_FILES += %reldir%/PKG_ADD 14 | 15 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 16 | -------------------------------------------------------------------------------- /test/classes/@Cork/set.m: -------------------------------------------------------------------------------- 1 | function s = set (s, varargin) 2 | 3 | propArgs = varargin; 4 | while (length (propArgs) >= 2) 5 | propName = propArgs{1}; 6 | propValue = propArgs{2}; 7 | propArgs = propArgs(3:end); 8 | switch propName 9 | case 'click' 10 | s.click = propValue; 11 | otherwise 12 | error ([propName, ' is not a valid Cork property']); 13 | end 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /test/classes/@Snork/set.m: -------------------------------------------------------------------------------- 1 | function s = set (s, varargin) 2 | 3 | propArgs = varargin; 4 | while (length (propArgs) >= 2) 5 | propName = propArgs{1}; 6 | propValue = propArgs{2}; 7 | propArgs = propArgs(3:end); 8 | switch propName 9 | case 'gick' 10 | s.gick = propValue; 11 | otherwise 12 | error ([propName, ' is not a valid Snork property']); 13 | end 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /test/classes/@Spork/set.m: -------------------------------------------------------------------------------- 1 | function s = set (s, varargin) 2 | 3 | propArgs = varargin; 4 | while (length (propArgs) >= 2) 5 | propName = propArgs{1}; 6 | propValue = propArgs{2}; 7 | propArgs = propArgs(3:end); 8 | switch propName 9 | case 'geek' 10 | s.geek = propValue; 11 | otherwise 12 | error ([propName, ' is not a valid Spork property']); 13 | end 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /examples/code/standalone.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int 5 | main (void) 6 | { 7 | std::cout << "Hello Octave world!\n"; 8 | 9 | int n = 2; 10 | Matrix a_matrix = Matrix (n, n); 11 | 12 | for (octave_idx_type i = 0; i < n; i++) 13 | for (octave_idx_type j = 0; j < n; j++) 14 | a_matrix(i,j) = (i + 1) * 10 + (j + 1); 15 | 16 | std::cout << a_matrix; 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/classes/@Blork/set.m: -------------------------------------------------------------------------------- 1 | function s = set (s, varargin) 2 | 3 | propArgs = varargin; 4 | while (length (propArgs) >= 2) 5 | propName = propArgs{1}; 6 | propValue = propArgs{2}; 7 | propArgs = propArgs(3:end); 8 | switch propName 9 | case 'bleek' 10 | s.bleek = propValue; 11 | otherwise 12 | error ([propName, ' is not a valid Blork property']); 13 | end 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /test/classes/@Pork/Pork.m: -------------------------------------------------------------------------------- 1 | function s = Pork (geek, gurk) 2 | 3 | if (nargin == 1 && isa (geek, 'Pork')) 4 | s = geek; 5 | else 6 | s.gurk = 0; 7 | if (nargin == 0) 8 | s0 = Spork (); 9 | elseif (nargin == 1) 10 | s0 = Spork (geek); 11 | else 12 | s0 = Spork (geek); 13 | s.gurk = gurk; 14 | end 15 | s = class (s, 'Pork', s0); 16 | end 17 | superiorto ('Dork'); 18 | 19 | end 20 | -------------------------------------------------------------------------------- /test/ctor-vs-method/@parent/parent.m: -------------------------------------------------------------------------------- 1 | function rot = parent (a) 2 | __trace__ ('begin parent/parent'); 3 | if (nargin == 0) 4 | rot = class (struct (), 'parent'); 5 | else 6 | switch class (a) 7 | case 'parent' 8 | %% copy constructor 9 | rot = a; 10 | otherwise 11 | error ('type mismatch in parent constructor') 12 | end 13 | end 14 | __trace__ ('end parent/parent'); 15 | end 16 | -------------------------------------------------------------------------------- /test/bug-51599/class_bug51599.m: -------------------------------------------------------------------------------- 1 | classdef class_bug51599 < handle 2 | properties 3 | anon_fcn 4 | endproperties 5 | methods 6 | function foo (obj) 7 | obj.anon_fcn = @(x) my_helper (x + 1); 8 | endfunction 9 | function ret = bar (obj, val) 10 | ret = obj.anon_fcn (val); 11 | endfunction 12 | endmethods 13 | endclassdef 14 | 15 | function ret = my_helper (val) 16 | ret = val + 1; 17 | endfunction 18 | -------------------------------------------------------------------------------- /test/pkg/mfile_minimal_test/DESCRIPTION: -------------------------------------------------------------------------------- 1 | Name: mfile_minimal_test 2 | Version: 0.1.0 3 | Date: 2017-12-08 4 | Author: hopefully various authors 5 | Maintainer: hopefully some of those authors. 6 | Title: Example Minimal Package 7 | Description: Minimal package structure with only m-files. 8 | Depends: octave (>= 4.2.1) 9 | License: GPLv3+ 10 | Categories: Test 11 | # BuildRequires: 12 | # SystemRequirements: 13 | # Url: external homepage 14 | -------------------------------------------------------------------------------- /scripts/testfun/private/html_plot_demos_template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Comparison of plots 5 | 6 | 15 | 16 | 17 |
18 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /scripts/web/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += %reldir% 2 | 3 | %canon_reldir%_FCN_FILES = \ 4 | %reldir%/web.m \ 5 | %reldir%/weboptions.m \ 6 | %reldir%/webread.m \ 7 | %reldir%/webwrite.m 8 | 9 | %canon_reldir%dir = $(fcnfiledir)/web 10 | 11 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 12 | 13 | FCN_FILES += $(%canon_reldir%_FCN_FILES) 14 | 15 | PKG_ADD_FILES += %reldir%/PKG_ADD 16 | 17 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 18 | -------------------------------------------------------------------------------- /test/bug-53956/bug-53956.tst: -------------------------------------------------------------------------------- 1 | %!test <*53956> 2 | %! global dtor2_called dtor4_called 3 | %! 4 | %! dtor2_called = dtor4_called = 0; 5 | %! x = bug53956_class_3 (); 6 | %! clear x 7 | %! assert (dtor2_called, 1); 8 | %! 9 | %! dtor2_called = dtor4_called = 0; 10 | %! x = bug53956_class_4 (); 11 | %! clear x 12 | %! assert (dtor2_called, 1); 13 | %! assert (dtor4_called, 1); 14 | %! 15 | %! clear -global dtor2_called dtor4_called; # cleanup after test 16 | -------------------------------------------------------------------------------- /examples/code/@FIRfilter/subsasgn.m: -------------------------------------------------------------------------------- 1 | function fout = subsasgn (f, index, val) 2 | 3 | switch (index.type) 4 | case "." 5 | fld = index.subs; 6 | if (! strcmp (fld, "polynomial")) 7 | error ('@FIRfilter/subsasgn: invalid property "%s"', fld); 8 | endif 9 | fout = f; 10 | fout.polynomial = val; 11 | 12 | otherwise 13 | error ("@FIRfilter/subsasgn: Invalid index type") 14 | endswitch 15 | 16 | endfunction 17 | -------------------------------------------------------------------------------- /m4/module.mk: -------------------------------------------------------------------------------- 1 | EXTRA_DIST += \ 2 | %reldir%/module.mk \ 3 | %reldir%/ax_blas.m4 \ 4 | %reldir%/ax_compare_version.m4 \ 5 | %reldir%/ax_lapack.m4 \ 6 | %reldir%/ax_openmp.m4 \ 7 | %reldir%/ax_pthread.m4 \ 8 | %reldir%/gnulib-cache.m4 \ 9 | %reldir%/libtool.m4 \ 10 | %reldir%/ltoptions.m4 \ 11 | %reldir%/ltsugar.m4 \ 12 | %reldir%/ltversion.m4 \ 13 | %reldir%/lt~obsolete.m4 \ 14 | %reldir%/octave_blas_f77_func.m4 \ 15 | %reldir%/pkg.m4 16 | -------------------------------------------------------------------------------- /examples/code/mycell.c: -------------------------------------------------------------------------------- 1 | #include "mex.h" 2 | 3 | void 4 | mexFunction (int nlhs, mxArray *plhs[], 5 | int nrhs, const mxArray *prhs[]) 6 | { 7 | mwSize n; 8 | mwIndex i; 9 | 10 | if (nrhs != 1 || ! mxIsCell (prhs[0])) 11 | mexErrMsgTxt ("ARG1 must be a cell"); 12 | 13 | n = mxGetNumberOfElements (prhs[0]); 14 | n = (n > nlhs ? nlhs : n); 15 | 16 | for (i = 0; i < n; i++) 17 | plhs[i] = mxDuplicateArray (mxGetCell (prhs[0], i)); 18 | } 19 | -------------------------------------------------------------------------------- /liboctave/external/odepack/module.mk: -------------------------------------------------------------------------------- 1 | EXTERNAL_SOURCES += \ 2 | %reldir%/cfode.f \ 3 | %reldir%/dlsode.f \ 4 | %reldir%/ewset.f \ 5 | %reldir%/intdy.f \ 6 | %reldir%/prepj.f \ 7 | %reldir%/solsy.f \ 8 | %reldir%/stode.f \ 9 | %reldir%/vnorm.f \ 10 | %reldir%/scfode.f \ 11 | %reldir%/sewset.f \ 12 | %reldir%/sintdy.f \ 13 | %reldir%/slsode.f \ 14 | %reldir%/sprepj.f \ 15 | %reldir%/ssolsy.f \ 16 | %reldir%/sstode.f \ 17 | %reldir%/svnorm.f 18 | -------------------------------------------------------------------------------- /test/classes/@CPrecedenceTester2/CPrecedenceTester2.m: -------------------------------------------------------------------------------- 1 | function x = CPrecedenceTester2 (flag) 2 | 3 | x = struct ('useless_data', pi^2); 4 | x = class (x, 'CPrecedenceTester2'); 5 | 6 | switch flag 7 | case 1 % CPrecedencetester2 > Snork 8 | superiorto ('Snork'); 9 | case 2 % CPrecedencetester2 < Snork 10 | inferiorto ('Snork'); 11 | otherwise 12 | error ('Incorrect value for argument flag: %d', flag); 13 | end 14 | 15 | end 16 | -------------------------------------------------------------------------------- /test/classes/@CPrecedenceTester3/CPrecedenceTester3.m: -------------------------------------------------------------------------------- 1 | function x = CPrecedenceTester3 (flag) 2 | 3 | x = struct ('useless_data', pi^3); 4 | x = class (x, 'CPrecedenceTester3'); 5 | 6 | switch flag 7 | case 1 % CPrecedencetester3 > Snork 8 | superiorto ('Snork'); 9 | case 2 % CPrecedencetester3 < Snork 10 | inferiorto ('Snork'); 11 | otherwise 12 | error ('Incorrect value for argument flag: %d', flag); 13 | end 14 | 15 | end 16 | -------------------------------------------------------------------------------- /liboctave/external/amos/zmlt.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE ZMLT(AR, AI, BR, BI, CR, CI) 2 | C***BEGIN PROLOGUE ZMLT 3 | C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY 4 | C 5 | C DOUBLE PRECISION COMPLEX MULTIPLY, C=A*B. 6 | C 7 | C***ROUTINES CALLED (NONE) 8 | C***END PROLOGUE ZMLT 9 | DOUBLE PRECISION AR, AI, BR, BI, CR, CI, CA, CB 10 | CA = AR*BR - AI*BI 11 | CB = AR*BI + AI*BR 12 | CR = CA 13 | CI = CB 14 | RETURN 15 | END 16 | -------------------------------------------------------------------------------- /test/bug-50014/duplicate_nested_in_subfunction_ok.m: -------------------------------------------------------------------------------- 1 | ## Test that duplicate names in separate subfunctions are OK. 2 | 3 | function retval = duplicate_nested_in_subfunction_ok () 4 | retval = sub1 () + sub2 (); 5 | endfunction 6 | 7 | function r = sub1 () 8 | function notbug () 9 | r = 1; 10 | endfunction 11 | notbug (); 12 | endfunction 13 | 14 | function r = sub2 () 15 | function notbug () 16 | r = 2; 17 | endfunction 18 | notbug (); 19 | endfunction 20 | -------------------------------------------------------------------------------- /doc/interpreter/doccheck/aspell.conf: -------------------------------------------------------------------------------- 1 | lang en_US 2 | mode texinfo 3 | add-filter tex 4 | add-texinfo-ignore set 5 | add-texinfo-ignore ifclear 6 | add-texinfo-ignore ifset 7 | add-texinfo-ignore macro 8 | add-texinfo-ignore include 9 | add-texinfo-ignore anchor 10 | add-texinfo-ignore deftypefn 11 | add-texinfo-ignore deftypefnx 12 | add-texinfo-ignore printindex 13 | add-texinfo-ignore multitable 14 | add-texinfo-ignore nospell 15 | personal ./doccheck/aspell-octave.en.pws 16 | -------------------------------------------------------------------------------- /liboctave/external/quadpack/module.mk: -------------------------------------------------------------------------------- 1 | EXTERNAL_SOURCES += \ 2 | %reldir%/dqagi.f \ 3 | %reldir%/dqagie.f \ 4 | %reldir%/dqagp.f \ 5 | %reldir%/dqagpe.f \ 6 | %reldir%/dqelg.f \ 7 | %reldir%/dqk15i.f \ 8 | %reldir%/dqk21.f \ 9 | %reldir%/dqpsrt.f \ 10 | %reldir%/qagie.f \ 11 | %reldir%/qagi.f \ 12 | %reldir%/qagpe.f \ 13 | %reldir%/qagp.f \ 14 | %reldir%/qelg.f \ 15 | %reldir%/qk15i.f \ 16 | %reldir%/qk21.f \ 17 | %reldir%/qpsrt.f \ 18 | %reldir%/xerror.f 19 | -------------------------------------------------------------------------------- /doc/doxyhtml/README: -------------------------------------------------------------------------------- 1 | This directory contains documentation in Doxygen format for 2 | Octave's source code. It is not created by default. 3 | 4 | To produce Doxygen documentation use 5 | 6 | make doxyhtml 7 | 8 | Doxygen documentation can be helpful for developers of Octave, but is not 9 | needed by users of Octave. In addition, the documentation requires 10 | approximately 3 GB of storage space. For these reasons it is not maintained 11 | under version control nor distributed in tarballs. 12 | -------------------------------------------------------------------------------- /liboctave/external/amos/xzexp.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE XZEXP(AR, AI, BR, BI) 2 | C***BEGIN PROLOGUE XZEXP 3 | C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY 4 | C 5 | C DOUBLE PRECISION COMPLEX EXPONENTIAL FUNCTION B=EXP(A) 6 | C 7 | C***ROUTINES CALLED (NONE) 8 | C***END PROLOGUE XZEXP 9 | DOUBLE PRECISION AR, AI, BR, BI, ZM, CA, CB 10 | ZM = DEXP(AR) 11 | CA = ZM*DCOS(AI) 12 | CB = ZM*DSIN(AI) 13 | BR = CA 14 | BI = CB 15 | RETURN 16 | END 17 | -------------------------------------------------------------------------------- /test/publish/test_script_code_only.m: -------------------------------------------------------------------------------- 1 | 2 | % Code only with a very very very very very very very very very very looong line 3 | % 4 | x = 5; 5 | 6 | for i = 1:5 7 | x += i; # Might be useful "perhaps" 8 | endfor 9 | 10 | %{ 11 | Multiline comment with keyword if "if" and 'if' 12 | %} 13 | 14 | if (x == 'a') 15 | y = sin (x); 16 | endif 17 | 18 | #{ 19 | Multiline comment with keyword if "if" and 'if' 20 | #} 21 | 22 | str = "some % string \" ' with %{"; 23 | str2 = 'another % string '' " with %{'; 24 | % 25 | -------------------------------------------------------------------------------- /test/bug-45351/bug-45351.tst: -------------------------------------------------------------------------------- 1 | %!shared obj, h1, h2, h3 2 | %! obj = bug45351 (); 3 | %! [h1, h2, h3] = obj.get_handles (); 4 | %!assert <*45351> (obj.bar (1), 'bug45351.foo: 1') 5 | %!assert <*45351> (obj.bar (2), 'bug45351.foo: 2') 6 | %!assert <*45351> (obj.bar (3), 'bug45351.foo: 3') 7 | %!assert <*45351> (h1 (obj, 1), 'bug45351.foo: 1') 8 | %!assert <*45351> (h2 (obj, 2), 'bug45351.foo: 2') 9 | %!assert <*45351> (h3 (obj, 3), 'bug45351.foo: 3') 10 | %!error (obj.h1 (1)) 11 | %!error (obj.h2 (2)) 12 | %!error (obj.h3 (3)) 13 | -------------------------------------------------------------------------------- /examples/code/helloworld.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | DEFUN_DLD (helloworld, args, nargout, 4 | "Hello World Help String") 5 | { 6 | octave_stdout << "Hello World has " 7 | << args.length () << " input arguments and " 8 | << nargout << " output arguments.\n"; 9 | 10 | // Return empty matrices for any outputs 11 | octave_value_list retval (nargout); 12 | for (int i = 0; i < nargout; i++) 13 | retval(i) = octave_value (Matrix ()); 14 | 15 | return retval; 16 | } 17 | -------------------------------------------------------------------------------- /scripts/@ftp/module.mk: -------------------------------------------------------------------------------- 1 | ## Automake fails to process "include %reldir%/module.mk" in the directory 2 | ## above. All of the commands which would normally be in this file were 3 | ## manually placed in scripts/module.mk to avoid using the "include" directive. 4 | ## 5 | ## This is an Automake bug. Automake has switched to a Perl backend which uses 6 | ## the following pattern to detect a path: 7 | ## 8 | ## my $PATH_PATTERN = '(\w|[+/.-])+'; 9 | ## 10 | ## This pattern only includes alphanumeric, '_', and [+/.-], but not "@". 11 | -------------------------------------------------------------------------------- /test/classdef/class_bug55766.m: -------------------------------------------------------------------------------- 1 | classdef class_bug55766 2 | 3 | properties 4 | testprop = 0; 5 | end 6 | 7 | properties (Access = public) 8 | publictestprop = 0; 9 | end 10 | 11 | properties (Access = protected) 12 | protectedtestprop = 0; 13 | end 14 | 15 | properties (Hidden) 16 | hiddentestprop = 0; 17 | end 18 | 19 | properties (Hidden = true) 20 | anotherhiddentestprop = 0; 21 | end 22 | 23 | properties (Hidden = false) 24 | notahiddentestprop = 0; 25 | end 26 | 27 | end 28 | -------------------------------------------------------------------------------- /test/classdef/module.mk: -------------------------------------------------------------------------------- 1 | classdef_TEST_FILES = \ 2 | %reldir%/class_bug52614A.m \ 3 | %reldir%/class_bug52614B.m \ 4 | %reldir%/class_bug55766.m \ 5 | %reldir%/classdef.tst \ 6 | %reldir%/foo_method_changes_property_size.m \ 7 | %reldir%/foo_static_method_constant_property.m \ 8 | %reldir%/foo_subsref_subsasgn.m \ 9 | %reldir%/foo_value_class.m \ 10 | %reldir%/plist_t1.m \ 11 | %reldir%/plist_t2.m \ 12 | %reldir%/plist_t3.m \ 13 | %reldir%/struct_wrapper.m 14 | 15 | TEST_FILES += $(classdef_TEST_FILES) 16 | -------------------------------------------------------------------------------- /examples/code/@polynomial/get.m: -------------------------------------------------------------------------------- 1 | function val = get (p, prop) 2 | 3 | if (nargin < 1 || nargin > 2) 4 | print_usage (); 5 | endif 6 | 7 | if (nargin == 1) 8 | val.poly = p.poly; 9 | else 10 | if (! ischar (prop)) 11 | error ("@polynomial/get: PROPERTY must be a string"); 12 | endif 13 | 14 | switch (prop) 15 | case "poly" 16 | val = p.poly; 17 | otherwise 18 | error ('@polynomial/get: invalid PROPERTY "%s"', prop); 19 | endswitch 20 | endif 21 | 22 | endfunction 23 | -------------------------------------------------------------------------------- /examples/code/@FIRfilter/subsref.m: -------------------------------------------------------------------------------- 1 | function r = subsref (f, x) 2 | 3 | switch (x.type) 4 | 5 | case "()" 6 | n = f.polynomial; 7 | r = filter (n.poly, 1, x.subs{1}); 8 | 9 | case "." 10 | fld = x.subs; 11 | if (! strcmp (fld, "polynomial")) 12 | error ('@FIRfilter/subsref: invalid property "%s"', fld); 13 | endif 14 | r = f.polynomial; 15 | 16 | otherwise 17 | error ("@FIRfilter/subsref: invalid subscript type for FIR filter"); 18 | 19 | endswitch 20 | 21 | endfunction 22 | -------------------------------------------------------------------------------- /scripts/io/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += %reldir% 2 | 3 | %canon_reldir%_FCN_FILES = \ 4 | %reldir%/beep.m \ 5 | %reldir%/csvread.m \ 6 | %reldir%/csvwrite.m \ 7 | %reldir%/dlmwrite.m \ 8 | %reldir%/fileread.m \ 9 | %reldir%/importdata.m \ 10 | %reldir%/is_valid_file_id.m 11 | 12 | %canon_reldir%dir = $(fcnfiledir)/io 13 | 14 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 15 | 16 | FCN_FILES += $(%canon_reldir%_FCN_FILES) 17 | 18 | PKG_ADD_FILES += %reldir%/PKG_ADD 19 | 20 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 21 | -------------------------------------------------------------------------------- /examples/code/oregonator.m: -------------------------------------------------------------------------------- 1 | ## The 'oregonator'. 2 | ## 3 | ## Reference: 4 | ## 5 | ## Oscillations in chemical systems. IV. Limit cycle behavior in a 6 | ## model of a real chemical reaction. Richard J. Field and Richard 7 | ## M. Noyes, The Journal of Chemical Physics, Volume 60 Number 5, 8 | ## March 1974. 9 | 10 | function dx = oregonator (x, t) 11 | 12 | dx = zeros (3, 1); 13 | 14 | dx(1) = 77.27*(x(2) - x(1)*x(2) + x(1) - 8.375e-06*x(1)^2); 15 | dx(2) = (x(3) - x(1)*x(2) - x(2)) / 77.27; 16 | dx(3) = 0.161*(x(1) - x(3)); 17 | 18 | end 19 | -------------------------------------------------------------------------------- /test/bug-50014/duplicate_subfunction_separate_scope_ok.m: -------------------------------------------------------------------------------- 1 | ## Test that nested functions with the same name are OK if they are 2 | ## defined inside other nested functions with different names. 3 | 4 | function retval = duplicate_subfunction_separate_scope_ok () 5 | function r = suba () 6 | function sub2 () 7 | r = 1; 8 | endfunction 9 | sub2 (); 10 | endfunction 11 | function subb () 12 | function sub2 () 13 | y = 2; 14 | endfunction 15 | sub2 (); 16 | endfunction 17 | subb (); 18 | retval = y + suba (); 19 | endfunction 20 | -------------------------------------------------------------------------------- /test/mex/bug_54096.c: -------------------------------------------------------------------------------- 1 | #include "mex.h" 2 | 3 | static const char* field_names[] = {"field"}; 4 | 5 | void mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) 6 | { 7 | mxArray *tmp_val; 8 | 9 | plhs[0] = mxCreateStructMatrix (1, 1, 1, field_names); 10 | 11 | mxSetFieldByNumber (plhs[0], 0, 0, NULL); 12 | 13 | tmp_val = mxGetFieldByNumber (plhs[0], 0, 0); 14 | 15 | if (tmp_val) 16 | mexErrMsgTxt ("struct elements set to NULL should be NULL internally"); 17 | 18 | /* But in the interpreter, they should appear as []. */ 19 | } 20 | -------------------------------------------------------------------------------- /test/bug-53599.tst: -------------------------------------------------------------------------------- 1 | %!function rval = sggval (val) 2 | %! global gval 3 | %! if (nargin == 1) 4 | %! gval = val; 5 | %! else 6 | %! rval = gval; 7 | %! endif 8 | %!endfunction 9 | 10 | %!test 11 | %! global gval 12 | %! assert (isempty (gval)) 13 | %! sggval (13); 14 | %! assert (sggval (), 13); 15 | %! assert (gval, 13); 16 | %! clear global gval 17 | %! assert (sggval (), []) 18 | %! gval = 42; 19 | %! assert (sggval (), []); 20 | %! clear gval 21 | %! global gval 22 | %! gval = 42; 23 | %! assert (sggval (), 42); 24 | %! clear -global gval; # cleanup after test 25 | -------------------------------------------------------------------------------- /test/bug-55758/class_bug_55758.m: -------------------------------------------------------------------------------- 1 | classdef class_bug_55758 < handle 2 | properties 3 | value 4 | endproperties 5 | 6 | methods 7 | function self = class_bug_55758 (val) 8 | if (nargin < 1) 9 | val = 0; 10 | endif 11 | self.value = val; 12 | endfunction 13 | 14 | function delete (self) 15 | global class_bug_55758_dtor_called; 16 | class_bug_55758_dtor_called = true; 17 | endfunction 18 | 19 | function ret = subsref (self, idx) 20 | ret = self.value; 21 | endfunction 22 | endmethods 23 | endclassdef 24 | -------------------------------------------------------------------------------- /examples/code/celldemo.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | DEFUN_DLD (celldemo, args, , "Cell Demo") 5 | { 6 | if (args.length () != 1) 7 | print_usage (); 8 | 9 | Cell c = args(0).cell_value (); 10 | 11 | octave_value_list retval; 12 | retval.resize (c.numel ()); // faster code by pre-declaring size 13 | 14 | for (octave_idx_type i = 0; i < c.numel (); i++) 15 | { 16 | retval(i) = c(i); // using operator syntax 17 | //retval(i) = c.elem (i); // using method syntax 18 | } 19 | 20 | return retval; 21 | } 22 | -------------------------------------------------------------------------------- /test/bug-53579.tst: -------------------------------------------------------------------------------- 1 | %!function [raa, rbb, igaa, igbb] = sub1 (aa, bb) 2 | %! global aa bb 3 | %! aa = 1; 4 | %! raa = aa; 5 | %! rbb = bb; 6 | %! igaa = isglobal ("aa"); 7 | %! igbb = isglobal ("bb"); 8 | %!endfunction 9 | 10 | %!test <*53579> 11 | %! global aa bb 12 | %! assert (isglobal ("aa")); 13 | %! assert (isglobal ("bb")); 14 | %! aa = 3; 15 | %! xx = 5; 16 | %! [raa, rbb, igaa, igbb] = sub1 (aa, xx); 17 | %! assert (raa, 1); 18 | %! assert (rbb, []); 19 | %! assert (igaa); 20 | %! assert (igbb); 21 | %! assert (xx, 5); 22 | %! clear -global aa bb; # cleanup after test 23 | -------------------------------------------------------------------------------- /test/bug-55758/bug-55758.tst: -------------------------------------------------------------------------------- 1 | %!test 2 | %! global class_bug_55758_dtor_called 3 | %! class_bug_55758_dtor_called = false; 4 | %! 5 | %! assert (class_bug_55758 (5).value, 5); 6 | %! assert (class_bug_55758_dtor_called); 7 | %! 8 | %! assert (class_bug_55758 (5)(1), 5); 9 | %! assert (class_bug_55758_dtor_called); 10 | %! 11 | %! assert (size (class_bug_55758 (5)), [1, 1]); 12 | %! assert (class_bug_55758_dtor_called); 13 | %! 14 | %! assert (numel (class_bug_55758 (5)), 1); 15 | %! assert (class_bug_55758_dtor_called); 16 | %! clear -global class_bug_55758_dtor_called; # cleanup after test 17 | -------------------------------------------------------------------------------- /liboctave/external/amos/zdiv.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE ZDIV(AR, AI, BR, BI, CR, CI) 2 | C***BEGIN PROLOGUE ZDIV 3 | C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY 4 | C 5 | C DOUBLE PRECISION COMPLEX DIVIDE C=A/B. 6 | C 7 | C***ROUTINES CALLED XZABS 8 | C***END PROLOGUE ZDIV 9 | DOUBLE PRECISION AR, AI, BR, BI, CR, CI, BM, CA, CB, CC, CD 10 | DOUBLE PRECISION XZABS 11 | BM = 1.0D0/XZABS(BR,BI) 12 | CC = BR*BM 13 | CD = BI*BM 14 | CA = (AR*CC+AI*CD)*BM 15 | CB = (AI*CC-AR*CD)*BM 16 | CR = CA 17 | CI = CB 18 | RETURN 19 | END 20 | -------------------------------------------------------------------------------- /examples/code/@FIRfilter/FIRfilter.m: -------------------------------------------------------------------------------- 1 | ## -*- texinfo -*- 2 | ## @deftypefn {} {} FIRfilter () 3 | ## @deftypefnx {} {} FIRfilter (@var{p}) 4 | ## Create a FIR filter with polynomial @var{p} as coefficient vector. 5 | ## @end deftypefn 6 | 7 | function f = FIRfilter (p) 8 | 9 | if (nargin > 1) 10 | print_usage (); 11 | endif 12 | 13 | if (nargin == 0) 14 | p = @polynomial ([1]); 15 | elseif (! isa (p, "polynomial")) 16 | error ("@FIRfilter: P must be a polynomial object"); 17 | endif 18 | 19 | f.polynomial = []; 20 | f = class (f, "FIRfilter", p); 21 | 22 | endfunction 23 | -------------------------------------------------------------------------------- /test/pkg/module.mk: -------------------------------------------------------------------------------- 1 | pkg_TEST_FILES = \ 2 | %reldir%/pkg.tst \ 3 | %reldir%/mfile_basic_test/INDEX \ 4 | %reldir%/mfile_basic_test/NEWS \ 5 | %reldir%/mfile_basic_test/DESCRIPTION \ 6 | %reldir%/mfile_basic_test/doc/macros.texi \ 7 | %reldir%/mfile_basic_test/doc/example-package.txi \ 8 | %reldir%/mfile_basic_test/COPYING \ 9 | %reldir%/mfile_basic_test/inst/example_mfile.m \ 10 | %reldir%/mfile_minimal_test/DESCRIPTION \ 11 | %reldir%/mfile_minimal_test/COPYING \ 12 | %reldir%/mfile_minimal_test/inst/example_mfile.m 13 | 14 | TEST_FILES += $(pkg_TEST_FILES) 15 | -------------------------------------------------------------------------------- /test/bug-41723/class_bug41723.m: -------------------------------------------------------------------------------- 1 | classdef class_bug41723 < handle 2 | properties 3 | value 4 | endproperties 5 | methods 6 | function obj = class_bug41723 () 7 | obj.value = helper_function (); 8 | endfunction 9 | function val = getval (obj) 10 | val = helper_function_2 (); 11 | endfunction 12 | endmethods 13 | endclassdef 14 | 15 | function y = helper_function () 16 | y = 42; 17 | endfunction 18 | 19 | function y = helper_function_2 (in) 20 | if (! nargin) 21 | y = helper_function_2 (true); 22 | else 23 | y = 2 * helper_function (); 24 | endif 25 | endfunction 26 | -------------------------------------------------------------------------------- /test/bug-53027/ntest53027b.m: -------------------------------------------------------------------------------- 1 | function [m_exist, n_exist] = ntest53027b () 2 | global x 3 | x = 3; 4 | n_exist = nest (); 5 | m_exist = exist ("x", 'var'); 6 | function n_exist = nest () 7 | ## The clear statement should operate on the variable in the 8 | ## parent scope even though there is no explicit varabiable 9 | ## reference in the code (the clear function just sees a string 10 | ## containing the name of the variable and the parser (correctly) 11 | ## does not treat this as a special case. 12 | clear x 13 | n_exist = exist ("x", "var"); 14 | endfunction 15 | endfunction 16 | -------------------------------------------------------------------------------- /examples/code/globaldemo.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | DEFMETHOD_DLD (globaldemo, interp, args, , "Global Demo") 5 | { 6 | if (args.length () != 1) 7 | print_usage (); 8 | 9 | octave_value retval; 10 | 11 | std::string s = args(0).string_value (); 12 | 13 | octave::symbol_table& symtab = interp.get_symbol_table (); 14 | 15 | octave_value tmp = symtab.global_varval (s); 16 | 17 | if (tmp.is_defined ()) 18 | retval = tmp; 19 | else 20 | retval = "Global variable not found"; 21 | 22 | symtab.global_assign ("a", 42.0); 23 | 24 | return retval; 25 | } 26 | -------------------------------------------------------------------------------- /libgui/qterminal/libqterminal/unix/konsole_wcwidth.h: -------------------------------------------------------------------------------- 1 | /* $XFree86: xc/programs/xterm/wcwidth.h,v 1.2 2001/06/18 19:09:27 dickey Exp $ */ 2 | 3 | /* Markus Kuhn -- 2001-01-12 -- public domain */ 4 | /* Adaptions for KDE by Waldo Bastian */ 5 | /* 6 | Rewritten for QT4 by e_k 7 | */ 8 | 9 | 10 | #ifndef _KONSOLE_WCWIDTH_H_ 11 | #define _KONSOLE_WCWIDTH_H_ 12 | 13 | // Qt 14 | #include 15 | 16 | int konsole_wcwidth(quint16 ucs); 17 | #if 0 18 | int konsole_wcwidth_cjk(Q_UINT16 ucs); 19 | #endif 20 | 21 | int string_width( const QString &txt ); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /test/bug-47680/super_bug47680.m: -------------------------------------------------------------------------------- 1 | classdef super_bug47680 2 | properties 3 | tag; 4 | end 5 | methods 6 | function obj = super_bug47680 (x) 7 | obj.tag = x; 8 | endfunction 9 | function r = meth1 (obj, x) 10 | r = [obj.tag ":super:meth1:" x]; 11 | endfunction 12 | function r = meth2 (obj, x) 13 | r = [obj.tag ":super:meth2:" x]; 14 | endfunction 15 | function r = meth3 (obj, x) 16 | r = [obj.tag ":super:meth3:" x]; 17 | endfunction 18 | function r = meth4 (obj, x) 19 | r = [obj.tag ":super:meth4:" x]; 20 | endfunction 21 | endmethods 22 | endclassdef 23 | -------------------------------------------------------------------------------- /scripts/legacy/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += %reldir% 2 | 3 | %canon_reldir%_FCN_FILES = \ 4 | %reldir%/findstr.m \ 5 | %reldir%/flipdim.m \ 6 | %reldir%/genvarname.m \ 7 | %reldir%/isdir.m \ 8 | %reldir%/isequalwithequalnans.m \ 9 | %reldir%/isstr.m \ 10 | %reldir%/setstr.m \ 11 | %reldir%/strmatch.m \ 12 | %reldir%/strread.m \ 13 | %reldir%/textread.m 14 | 15 | %canon_reldir%dir = $(fcnfiledir)/legacy 16 | 17 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 18 | 19 | FCN_FILES += $(%canon_reldir%_FCN_FILES) 20 | 21 | PKG_ADD_FILES += %reldir%/PKG_ADD 22 | 23 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 24 | -------------------------------------------------------------------------------- /test/bug-53027/ntest53027c.m: -------------------------------------------------------------------------------- 1 | function [m_exist, n_exist] = ntest53027c () 2 | ## In this test, x is not global. 3 | x = 3; 4 | n_exist = nest (); 5 | m_exist = exist ("x", 'var'); 6 | function n_exist = nest () 7 | ## The clear statement should operate on the variable in the 8 | ## parent scope even though there is no explicit varabiable 9 | ## reference in the code (the clear function just sees a string 10 | ## containing the name of the variable and the parser (correctly) 11 | ## does not treat this as a special case. 12 | clear x 13 | n_exist = exist ("x", "var"); 14 | endfunction 15 | endfunction 16 | -------------------------------------------------------------------------------- /examples/code/@FIRfilter/FIRfilter_aggregation.m: -------------------------------------------------------------------------------- 1 | ## -*- texinfo -*- 2 | ## @deftypefn {} {} FIRfilter () 3 | ## @deftypefnx {} {} FIRfilter (@var{p}) 4 | ## Create a FIR filter with polynomial @var{p} as coefficient vector. 5 | ## @end deftypefn 6 | 7 | function f = FIRfilter (p) 8 | 9 | if (nargin > 1) 10 | print_usage (); 11 | endif 12 | 13 | if (nargin == 0) 14 | f.polynomial = @polynomial ([1]); 15 | else 16 | if (! isa (p, "polynomial")) 17 | error ("@FIRfilter: P must be a polynomial object"); 18 | endif 19 | 20 | f.polynomial = p; 21 | endif 22 | 23 | f = class (f, "FIRfilter"); 24 | 25 | endfunction 26 | -------------------------------------------------------------------------------- /test/bug-47680/sub_bug47680.m: -------------------------------------------------------------------------------- 1 | classdef sub_bug47680 < super_bug47680 2 | methods 3 | function obj = sub_bug47680 (x) 4 | obj = obj@super_bug47680 (x); 5 | endfunction 6 | function r = meth1 (obj) 7 | r = meth1@super_bug47680 (obj, "sub:meth1"); 8 | endfunction 9 | function r = meth2 (obj) 10 | r = obj.meth2@super_bug47680 ("sub:meth2"); 11 | endfunction 12 | function r = meth3 (obj) 13 | r = meth3@super_bug47680 (obj, "sub:meth3"); 14 | endfunction 15 | function r = meth4 (obj) 16 | r = obj.meth4@super_bug47680 ("sub:meth4"); 17 | endfunction 18 | endmethods 19 | endclassdef 20 | -------------------------------------------------------------------------------- /etc/CHECKLIST: -------------------------------------------------------------------------------- 1 | Things to do before making a release: 2 | 3 | * Update the version number and release date in configure.ac. 4 | 5 | * Update the OCTAVE_API_VERSION number in configure.ac. 6 | 7 | * Update version number and release year in CITATION. 8 | 9 | * Update the NEWS file. Include release date in Summary header. 10 | 11 | * Update the NEWS-.html, index.in, news.in, and download.in 12 | files for the web site. 13 | 14 | * Copy tarballs to ftp.gnu.org. 15 | 16 | * Post a release announcement to the help@octave.org and 17 | info-gnu@gnu.org lists. 18 | 19 | * Update https://wiki.octave.org/Release_History page. 20 | -------------------------------------------------------------------------------- /scripts/special-matrix/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += %reldir% 2 | 3 | %canon_reldir%_FCN_FILES = \ 4 | %reldir%/gallery.m \ 5 | %reldir%/hadamard.m \ 6 | %reldir%/hankel.m \ 7 | %reldir%/hilb.m \ 8 | %reldir%/invhilb.m \ 9 | %reldir%/magic.m \ 10 | %reldir%/pascal.m \ 11 | %reldir%/rosser.m \ 12 | %reldir%/toeplitz.m \ 13 | %reldir%/vander.m \ 14 | %reldir%/wilkinson.m 15 | 16 | %canon_reldir%dir = $(fcnfiledir)/special-matrix 17 | 18 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 19 | 20 | FCN_FILES += $(%canon_reldir%_FCN_FILES) 21 | 22 | PKG_ADD_FILES += %reldir%/PKG_ADD 23 | 24 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 25 | -------------------------------------------------------------------------------- /examples/code/fortransub.f: -------------------------------------------------------------------------------- 1 | subroutine fortransub (n, a, s) 2 | implicit none 3 | character*(*) s 4 | real*8 a(*) 5 | integer*4 i, n, ioerr 6 | do i = 1, n 7 | if (a(i) .eq. 0d0) then 8 | call xstopx ('fortransub: divide by zero') 9 | else 10 | a(i) = 1d0 / a(i) 11 | endif 12 | enddo 13 | write (unit = s, fmt = '(a,i3,a,a)', iostat = ioerr) 14 | $ 'There are ', n, 15 | $ ' values in the input vector', char(0) 16 | if (ioerr .ne. 0) then 17 | call xstopx ('fortransub: error writing string') 18 | endif 19 | return 20 | end 21 | -------------------------------------------------------------------------------- /liboctave/external/amos/zshch.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE ZSHCH(ZR, ZI, CSHR, CSHI, CCHR, CCHI) 2 | C***BEGIN PROLOGUE ZSHCH 3 | C***REFER TO ZBESK,ZBESH 4 | C 5 | C ZSHCH COMPUTES THE COMPLEX HYPERBOLIC FUNCTIONS CSH=SINH(X+I*Y) 6 | C AND CCH=COSH(X+I*Y), WHERE I**2=-1. 7 | C 8 | C***ROUTINES CALLED (NONE) 9 | C***END PROLOGUE ZSHCH 10 | C 11 | DOUBLE PRECISION CCHI, CCHR, CH, CN, CSHI, CSHR, SH, SN, ZI, ZR, 12 | * DCOSH, DSINH 13 | SH = DSINH(ZR) 14 | CH = DCOSH(ZR) 15 | SN = DSIN(ZI) 16 | CN = DCOS(ZI) 17 | CSHR = SH*CN 18 | CSHI = CH*SN 19 | CCHR = CH*CN 20 | CCHI = SH*SN 21 | RETURN 22 | END 23 | -------------------------------------------------------------------------------- /scripts/profiler/html/flat.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %title 6 | 7 | 8 | 9 |

Flat %title

10 |

hierarchical profile

11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | %entries 22 | 23 |
FunctionTime (s)Time (%)Calls
24 | 25 | 26 | -------------------------------------------------------------------------------- /test/bug-49379/class_bug49379.m: -------------------------------------------------------------------------------- 1 | classdef class_bug49379 < handle 2 | properties 3 | m_ctor_arg_names = {}; 4 | m_meth_arg_names = {}; 5 | endproperties 6 | methods 7 | function obj = class_bug49379 (x, y) 8 | obj.m_ctor_arg_names = {inputname(1), inputname(2)}; 9 | endfunction 10 | function meth (obj, x, y) 11 | obj.m_meth_arg_names = {inputname(1), inputname(2), inputname(3)}; 12 | endfunction 13 | function names = ctor_arg_names (obj) 14 | names = obj.m_ctor_arg_names; 15 | endfunction 16 | function names = meth_arg_names (obj) 17 | names = obj.m_meth_arg_names; 18 | endfunction 19 | endmethods 20 | endclassdef 21 | -------------------------------------------------------------------------------- /test/bug-50014/module.mk: -------------------------------------------------------------------------------- 1 | bug_50014_TEST_FILES = \ 2 | %reldir%/bug-50014.tst \ 3 | %reldir%/duplicate_nested_function.m \ 4 | %reldir%/duplicate_nested_in_subfunction_ok.m \ 5 | %reldir%/duplicate_nested_parent_function.m \ 6 | %reldir%/duplicate_parent_nested2.m \ 7 | %reldir%/duplicate_parent_nested_function.m \ 8 | %reldir%/duplicate_primary_nested_function.m \ 9 | %reldir%/duplicate_primary_subfunction.m \ 10 | %reldir%/duplicate_primary_subfunction_old_syntax.m \ 11 | %reldir%/duplicate_subfunction.m \ 12 | %reldir%/duplicate_subfunction_old_syntax.m \ 13 | %reldir%/duplicate_subfunction_separate_scope_ok.m 14 | 15 | TEST_FILES += $(bug_50014_TEST_FILES) 16 | -------------------------------------------------------------------------------- /scripts/profiler/html/hierarchical.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %title 6 | 7 | 8 | 9 |

Hierarchical %title

10 |

flat profile

11 |

%parents

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | %entries 23 | 24 |
FunctionTotal (s)Self (s)Calls
25 | 26 | 27 | -------------------------------------------------------------------------------- /test/nest/module.mk: -------------------------------------------------------------------------------- 1 | nest_TEST_FILES = \ 2 | %reldir%/arg_nest.m \ 3 | %reldir%/arg_ret.m \ 4 | %reldir%/counter.m \ 5 | %reldir%/nest.tst \ 6 | %reldir%/nest_eval.m \ 7 | %reldir%/no_closure.m \ 8 | %reldir%/nst1.m \ 9 | %reldir%/nst2.m \ 10 | %reldir%/nst3.m \ 11 | %reldir%/persistent_nest.m \ 12 | %reldir%/recursive_nest.m \ 13 | %reldir%/recursive_nest2.m \ 14 | %reldir%/recursive_nest3.m \ 15 | %reldir%/scope0.m \ 16 | %reldir%/scope1.m \ 17 | %reldir%/scope2.m \ 18 | %reldir%/scope3.m \ 19 | %reldir%/script_nest.m \ 20 | %reldir%/script_nest_script.m \ 21 | %reldir%/varg_nest.m \ 22 | %reldir%/varg_nest2.m 23 | 24 | TEST_FILES += $(nest_TEST_FILES) 25 | -------------------------------------------------------------------------------- /test/bug-49904.tst: -------------------------------------------------------------------------------- 1 | %!shared A 2 | %! A = [ ... 3 | %! 1.00003+0.00000i, -0.68292+0.26406i, -0.57670+0.25291i, 0.34986+0.03335i; 4 | %! -0.68292-0.26406i, 0.94539+0.00000i, 0.69006-0.03967i, -0.43847+0.38619i; 5 | %! -0.57670-0.25291i, 0.69006+0.03967i, 0.95260+0.00000i, -0.34734+0.40728i; 6 | %! 0.34986-0.03335i, -0.43847-0.38619i, -0.34734-0.40728i, 0.98356+0.00000i]; 7 | %! 8 | 9 | %!test 10 | %! [Ainv, rcond] = inv (A); 11 | %! assert (ishermitian (Ainv)); 12 | %! assert (A * Ainv, eye (4, 'double'), eps ('double') / rcond) 13 | 14 | %!test 15 | %! [Ainv, rcond] = inv (single (A)); 16 | %! assert (ishermitian (Ainv)); 17 | %! assert (A * Ainv, eye (4, 'single'), eps ('single') / rcond) 18 | -------------------------------------------------------------------------------- /examples/code/fortrandemo.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | extern "C" 5 | { 6 | F77_RET_T 7 | F77_FUNC (fortransub, FORTSUB) 8 | (const F77_INT&, F77_DBLE*, F77_CHAR_ARG_DECL F77_CHAR_ARG_LEN_DECL); 9 | } 10 | 11 | DEFUN_DLD (fortrandemo, args, , "Fortran Demo") 12 | { 13 | if (args.length () != 1) 14 | print_usage (); 15 | 16 | NDArray a = args(0).array_value (); 17 | 18 | double *av = a.fortran_vec (); 19 | octave_idx_type na = a.numel (); 20 | 21 | OCTAVE_LOCAL_BUFFER (char, ctmp, 128); 22 | 23 | F77_XFCN (fortransub, FORTSUB, 24 | (na, av, ctmp F77_CHAR_ARG_LEN (128))); 25 | 26 | return ovl (a, std::string (ctmp)); 27 | } 28 | -------------------------------------------------------------------------------- /examples/code/oregonator.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | DEFUN_DLD (oregonator, args, , 4 | "The 'oregonator'.\n\ 5 | \n\ 6 | Reference:\n\ 7 | \n\ 8 | Oscillations in chemical systems. IV. Limit cycle behavior in a\n\ 9 | model of a real chemical reaction. Richard J. Field and Richard\n\ 10 | M. Noyes, The Journal of Chemical Physics, Volume 60 Number 5,\n\ 11 | March 1974.") 12 | { 13 | ColumnVector dx (3); 14 | 15 | ColumnVector x (args(0).vector_value ()); 16 | 17 | dx(0) = 77.27 * (x(1) - x(0)*x(1) + x(0) - 8.375e-06*pow (x(0), 2.0)); 18 | dx(1) = (x(2) - x(0)*x(1) - x(1)) / 77.27; 19 | dx(2) = 0.161*(x(0) - x(2)); 20 | 21 | return octave_value (dx); 22 | } 23 | -------------------------------------------------------------------------------- /scripts/profiler/html/function.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %title 6 | 7 | 8 | 9 |

Function %name

10 |

flat profile

11 |
12 |
Attributes:
13 |
%attr
14 |
Total time:
15 |
%timeabs seconds
16 |
Number of calls:
17 |
%calls
18 |
Called by:
19 |
%parents
20 |
Calling:
21 |
%children
22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/code/@polynomial/set.m: -------------------------------------------------------------------------------- 1 | function pout = set (p, varargin) 2 | 3 | if (numel (varargin) < 2 || rem (numel (varargin), 2) != 0) 4 | error ("@polynomial/set: expecting PROPERTY/VALUE pairs"); 5 | endif 6 | 7 | pout = p; 8 | while (numel (varargin) > 1) 9 | prop = varargin{1}; 10 | val = varargin{2}; 11 | varargin(1:2) = []; 12 | if (! ischar (prop) || ! strcmp (prop, "poly")) 13 | error ("@polynomial/set: invalid PROPERTY for polynomial class"); 14 | elseif (! (isreal (val) && isvector (val))) 15 | error ("@polynomial/set: VALUE must be a real vector"); 16 | endif 17 | 18 | pout.poly = val(:).'; # force row vector 19 | endwhile 20 | 21 | endfunction 22 | -------------------------------------------------------------------------------- /examples/code/funcdemo.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | DEFMETHOD_DLD (funcdemo, interp, args, nargout, "Function Demo") 5 | { 6 | int nargin = args.length (); 7 | 8 | if (nargin < 2) 9 | print_usage (); 10 | 11 | octave_value_list newargs; 12 | 13 | for (octave_idx_type i = nargin - 1; i > 0; i--) 14 | newargs(i-1) = args(i); 15 | 16 | octave_value_list retval; 17 | 18 | if (args(0).is_function_handle () || args(0).is_inline_function () 19 | || args(0).is_string ()) 20 | retval = interp.feval (args(0), newargs, nargout); 21 | else 22 | error ("funcdemo: INPUT must be string, inline, or function handle"); 23 | 24 | return retval; 25 | } 26 | -------------------------------------------------------------------------------- /examples/code/mystring.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mex.h" 3 | 4 | void 5 | mexFunction (int nlhs, mxArray *plhs[], 6 | int nrhs, const mxArray *prhs[]) 7 | { 8 | mwSize m, n; 9 | mwIndex i, j; 10 | mxChar *pi, *po; 11 | 12 | if (nrhs != 1 || ! mxIsChar (prhs[0]) 13 | || mxGetNumberOfDimensions (prhs[0]) > 2) 14 | mexErrMsgTxt ("ARG1 must be a char matrix"); 15 | 16 | m = mxGetM (prhs[0]); 17 | n = mxGetN (prhs[0]); 18 | pi = mxGetChars (prhs[0]); 19 | plhs[0] = mxCreateNumericMatrix (m, n, mxCHAR_CLASS, mxREAL); 20 | po = mxGetChars (plhs[0]); 21 | 22 | for (j = 0; j < n; j++) 23 | for (i = 0; i < m; i++) 24 | po[j*m + m - 1 - i] = pi[j*m + i]; 25 | } 26 | -------------------------------------------------------------------------------- /scripts/time/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += %reldir% 2 | 3 | %canon_reldir%_FCN_FILES = \ 4 | %reldir%/addtodate.m \ 5 | %reldir%/asctime.m \ 6 | %reldir%/calendar.m \ 7 | %reldir%/clock.m \ 8 | %reldir%/ctime.m \ 9 | %reldir%/date.m \ 10 | %reldir%/datenum.m \ 11 | %reldir%/datestr.m \ 12 | %reldir%/datevec.m \ 13 | %reldir%/eomday.m \ 14 | %reldir%/etime.m \ 15 | %reldir%/is_leap_year.m \ 16 | %reldir%/now.m \ 17 | %reldir%/weekday.m 18 | 19 | %canon_reldir%dir = $(fcnfiledir)/time 20 | 21 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 22 | 23 | FCN_FILES += $(%canon_reldir%_FCN_FILES) 24 | 25 | PKG_ADD_FILES += %reldir%/PKG_ADD 26 | 27 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 28 | -------------------------------------------------------------------------------- /examples/code/stringdemo.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | DEFUN_DLD (stringdemo, args, , "String Demo") 4 | { 5 | if (args.length () != 1) 6 | print_usage (); 7 | 8 | octave_value_list retval; 9 | 10 | charMatrix ch = args(0).char_matrix_value (); 11 | 12 | retval(1) = octave_value (ch, '\''); // Single Quote String 13 | 14 | octave_idx_type nr = ch.rows (); 15 | 16 | for (octave_idx_type i = 0; i < nr / 2; i++) 17 | { 18 | std::string tmp = ch.row_as_string (i); 19 | 20 | ch.insert (ch.row_as_string (nr-i-1).c_str (), i, 0); 21 | ch.insert (tmp.c_str (), nr-i-1, 0); 22 | } 23 | 24 | retval(0) = octave_value (ch, '"'); // Double Quote String 25 | 26 | return retval; 27 | } 28 | -------------------------------------------------------------------------------- /test/classdef/foo_value_class.m: -------------------------------------------------------------------------------- 1 | classdef foo_value_class 2 | properties 3 | rate; 4 | term; 5 | principle; 6 | end 7 | methods 8 | function obj = foo_value_class (r, t, p) 9 | if (nargin == 3) 10 | obj.rate = r; 11 | obj.term = t; 12 | obj.principle = p; 13 | elseif (nargin ~= 0) 14 | error ('foo_value_class:SyntaxError', ... 15 | 'foo_value_class: Invalid syntax') 16 | end 17 | end 18 | function amt = amount (obj) 19 | i = obj.rate / (12 * 100); 20 | if (i == 0 && obj.term == 0) 21 | amt = obj.principle; 22 | else 23 | amt = (obj.principle * i) / (1 - (1 + i)^(-obj.term)); 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /liboctave/external/amos/cshch.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE CSHCH(Z, CSH, CCH) 2 | C***BEGIN PROLOGUE CSHCH 3 | C***REFER TO CBESK,CBESH 4 | C 5 | C CSHCH COMPUTES THE COMPLEX HYPERBOLIC FUNCTIONS CSH=SINH(X+I*Y) 6 | C AND CCH=COSH(X+I*Y), WHERE I**2=-1. 7 | C 8 | C***ROUTINES CALLED (NONE) 9 | C***END PROLOGUE CSHCH 10 | COMPLEX CCH, CSH, Z 11 | REAL CCHI, CCHR, CH, CN, CSHI, CSHR, SH, SN, X, Y, COSH, SINH 12 | X = REAL(Z) 13 | Y = AIMAG(Z) 14 | SH = SINH(X) 15 | CH = COSH(X) 16 | SN = SIN(Y) 17 | CN = COS(Y) 18 | CSHR = SH*CN 19 | CSHI = CH*SN 20 | CSH = CMPLX(CSHR,CSHI) 21 | CCHR = CH*CN 22 | CCHI = SH*SN 23 | CCH = CMPLX(CCHR,CCHI) 24 | RETURN 25 | END 26 | -------------------------------------------------------------------------------- /test/classes/@Gork/set.m: -------------------------------------------------------------------------------- 1 | function s = set (s, varargin) 2 | 3 | propArgs = varargin; 4 | while (length (propArgs) >= 2) 5 | propName = propArgs{1}; 6 | propValue = propArgs{2}; 7 | propArgs = propArgs(3:end); 8 | switch propName 9 | case 'cork' 10 | if (isa (propValue, 'Cork')) 11 | s.Cork = propValue; 12 | else 13 | s.Cork = set (s.Cork, 'click', propValue); 14 | end 15 | case 'gark' 16 | s.gark = propValue; 17 | otherwise 18 | % Note that get/set for multiple parents is hard. We only do one 19 | % branch of the parent tree just to test this stuff out. 20 | s.Dork = set (s.Dork, propName, propValue); 21 | end 22 | end 23 | 24 | end 25 | -------------------------------------------------------------------------------- /scripts/path/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += \ 2 | %reldir% \ 3 | %reldir%/private 4 | 5 | %canon_reldir%_PRIVATE_FCN_FILES = \ 6 | %reldir%/private/getsavepath.m 7 | 8 | %canon_reldir%_FCN_FILES = \ 9 | %reldir%/import.m \ 10 | %reldir%/matlabroot.m \ 11 | %reldir%/pathdef.m \ 12 | %reldir%/savepath.m 13 | 14 | %canon_reldir%dir = $(fcnfiledir)/path 15 | 16 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 17 | 18 | %canon_reldir%_privatedir = $(fcnfiledir)/path/private 19 | 20 | %canon_reldir%_private_DATA = $(%canon_reldir%_PRIVATE_FCN_FILES) 21 | 22 | FCN_FILES += \ 23 | $(%canon_reldir%_FCN_FILES) \ 24 | $(%canon_reldir%_PRIVATE_FCN_FILES) 25 | 26 | PKG_ADD_FILES += %reldir%/PKG_ADD 27 | 28 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 29 | -------------------------------------------------------------------------------- /examples/code/myprop.c: -------------------------------------------------------------------------------- 1 | #include "mex.h" 2 | 3 | void 4 | mexFunction (int nlhs, mxArray *plhs[], 5 | int nrhs, const mxArray *prhs[]) 6 | { 7 | double handle; 8 | char property[256]; 9 | 10 | if (nrhs < 2 || nrhs > 3) 11 | mexErrMsgTxt ("incorrect number of arguments"); 12 | if (! mxIsDouble (prhs[0])) 13 | mexErrMsgTxt ("handle must be a double scalar"); 14 | if (! mxIsChar (prhs[1])) 15 | mexErrMsgTxt ("property must be a string"); 16 | 17 | handle = mxGetScalar (prhs[0]); 18 | mxGetString (prhs[1], property, 256); 19 | plhs[0] = mxDuplicateArray (mexGet (handle, property)); 20 | 21 | if (nrhs == 3) 22 | if (mexSet (handle, property, mxDuplicateArray (prhs[2]))) 23 | mexErrMsgTxt ("failed to set property"); 24 | } 25 | -------------------------------------------------------------------------------- /liboctave/external/daspk/module.mk: -------------------------------------------------------------------------------- 1 | EXTERNAL_SOURCES += \ 2 | %reldir%/datv.f \ 3 | %reldir%/dcnst0.f \ 4 | %reldir%/dcnstr.f \ 5 | %reldir%/ddasic.f \ 6 | %reldir%/ddasid.f \ 7 | %reldir%/ddasik.f \ 8 | %reldir%/ddaspk.f \ 9 | %reldir%/ddstp.f \ 10 | %reldir%/ddwnrm.f \ 11 | %reldir%/dfnrmd.f \ 12 | %reldir%/dfnrmk.f \ 13 | %reldir%/dhels.f \ 14 | %reldir%/dheqr.f \ 15 | %reldir%/dinvwt.f \ 16 | %reldir%/dlinsd.f \ 17 | %reldir%/dlinsk.f \ 18 | %reldir%/dmatd.f \ 19 | %reldir%/dnedd.f \ 20 | %reldir%/dnedk.f \ 21 | %reldir%/dnsd.f \ 22 | %reldir%/dnsid.f \ 23 | %reldir%/dnsik.f \ 24 | %reldir%/dnsk.f \ 25 | %reldir%/dorth.f \ 26 | %reldir%/dslvd.f \ 27 | %reldir%/dslvk.f \ 28 | %reldir%/dspigm.f \ 29 | %reldir%/dyypnw.f 30 | -------------------------------------------------------------------------------- /examples/code/@polynomial/disp.m: -------------------------------------------------------------------------------- 1 | function disp (p) 2 | 3 | a = p.poly; 4 | first = true; 5 | for i = 1 : length (a); 6 | if (a(i) != 0) 7 | if (first) 8 | first = false; 9 | elseif (a(i) > 0 || isnan (a(i))) 10 | printf (" +"); 11 | endif 12 | if (a(i) < 0) 13 | printf (" -"); 14 | endif 15 | if (i == 1) 16 | printf (" %.5g", abs (a(i))); 17 | elseif (abs (a(i)) != 1) 18 | printf (" %.5g *", abs (a(i))); 19 | endif 20 | if (i > 1) 21 | printf (" X"); 22 | endif 23 | if (i > 2) 24 | printf (" ^ %d", i - 1); 25 | endif 26 | endif 27 | endfor 28 | 29 | if (first) 30 | printf (" 0"); 31 | endif 32 | printf ("\n"); 33 | 34 | endfunction 35 | -------------------------------------------------------------------------------- /examples/code/myfeval.c: -------------------------------------------------------------------------------- 1 | #include "mex.h" 2 | 3 | void 4 | mexFunction (int nlhs, mxArray *plhs[], 5 | int nrhs, const mxArray *prhs[]) 6 | { 7 | char *str; 8 | 9 | mexPrintf ("Starting file myfeval.mex\n"); 10 | 11 | mexPrintf ("I have %d inputs and %d outputs\n", nrhs, nlhs); 12 | 13 | if (nrhs < 1 || ! mxIsChar (prhs[0])) 14 | mexErrMsgTxt ("ARG1 must be a function name"); 15 | 16 | str = mxArrayToString (prhs[0]); 17 | 18 | mexPrintf ("I'm going to call the function %s\n", str); 19 | 20 | if (nlhs == 0) 21 | nlhs = 1; // Octave's automatic 'ans' variable 22 | 23 | /* Cast prhs just to get rid of 'const' qualifier and stop compile warning */ 24 | mexCallMATLAB (nlhs, plhs, nrhs-1, (mxArray**)prhs+1, str); 25 | 26 | mxFree (str); 27 | } 28 | -------------------------------------------------------------------------------- /scripts/geometry/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += %reldir% 2 | 3 | %canon_reldir%_FCN_FILES = \ 4 | %reldir%/convhull.m \ 5 | %reldir%/delaunay.m \ 6 | %reldir%/delaunayn.m \ 7 | %reldir%/dsearch.m \ 8 | %reldir%/dsearchn.m \ 9 | %reldir%/griddata.m \ 10 | %reldir%/griddata3.m \ 11 | %reldir%/griddatan.m \ 12 | %reldir%/inpolygon.m \ 13 | %reldir%/rectint.m \ 14 | %reldir%/rotx.m \ 15 | %reldir%/roty.m \ 16 | %reldir%/rotz.m \ 17 | %reldir%/tsearchn.m \ 18 | %reldir%/voronoi.m \ 19 | %reldir%/voronoin.m 20 | 21 | %canon_reldir%dir = $(fcnfiledir)/geometry 22 | 23 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 24 | 25 | FCN_FILES += $(%canon_reldir%_FCN_FILES) 26 | 27 | PKG_ADD_FILES += %reldir%/PKG_ADD 28 | 29 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 30 | -------------------------------------------------------------------------------- /examples/code/standalonebuiltin.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int 6 | main (void) 7 | { 8 | int n = 2; 9 | Matrix a_matrix = Matrix (n, n); 10 | 11 | for (octave_idx_type i = 0; i < n; i++) 12 | for (octave_idx_type j = 0; j < n; j++) 13 | a_matrix(i,j) = (i + 1) * 10 + (j + 1); 14 | 15 | std::cout << "This is a matrix:" << std::endl 16 | << a_matrix << std::endl; 17 | 18 | octave_value_list in; 19 | in(0) = a_matrix; 20 | 21 | octave_value_list out = Fnorm (in, 1); 22 | double norm_of_the_matrix = out(0).double_value (); 23 | 24 | std::cout << "This is the norm of the matrix:" << std::endl 25 | << norm_of_the_matrix << std::endl; 26 | 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /liboctave/external/odepack/vnorm.f: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION FUNCTION VNORM (N, V, W) 2 | CLLL. OPTIMIZE 3 | C----------------------------------------------------------------------- 4 | C THIS FUNCTION ROUTINE COMPUTES THE WEIGHTED ROOT-MEAN-SQUARE NORM 5 | C OF THE VECTOR OF LENGTH N CONTAINED IN THE ARRAY V, WITH WEIGHTS 6 | C CONTAINED IN THE ARRAY W OF LENGTH N.. 7 | C VNORM = SQRT( (1/N) * SUM( V(I)*W(I) )**2 ) 8 | C----------------------------------------------------------------------- 9 | INTEGER N, I 10 | DOUBLE PRECISION V, W, SUM 11 | DIMENSION V(N), W(N) 12 | SUM = 0.0D0 13 | DO 10 I = 1,N 14 | 10 SUM = SUM + (V(I)*W(I))**2 15 | VNORM = DSQRT(SUM/DBLE(N)) 16 | RETURN 17 | C----------------------- END OF FUNCTION VNORM ------------------------- 18 | END 19 | -------------------------------------------------------------------------------- /liboctave/external/amos/README: -------------------------------------------------------------------------------- 1 | The files in this directory have been modified from those found on 2 | netlib by changing the following subroutine names 3 | 4 | zabs --> xzabs 5 | zexp --> xzexp 6 | zlog --> xzlog 7 | zsqrt --> xzsqrt 8 | 9 | to avoid conflicts with non-standard but commonly used Fortran 10 | intrinsic function names. 11 | 12 | John W. Eaton 13 | jwe@octave.org 14 | 15 | Wed Nov 11 17:29:50 1998 16 | 17 | More files have been modified to recover Matlab compatibility for 18 | Bessel functions. Now the output is always computed, independently 19 | from the magnitude of the input 20 | 21 | cbesh.f 22 | cbesi.f 23 | cbesj.f 24 | cbesk.f 25 | zbesh.f 26 | zbesi.f 27 | zbesj.f 28 | zbesk.f 29 | 30 | Michele Ginesi 31 | michele.ginesi@gmail.com 32 | 33 | Sat Jul 22 11:43:40 2017 34 | -------------------------------------------------------------------------------- /test/fcn-handle/module.mk: -------------------------------------------------------------------------------- 1 | fcn_handle_TEST_FILES = \ 2 | %reldir%/+pkga/+pkgb/bug51709_a.m \ 3 | %reldir%/+pkga/+pkgb/bug51709_b.m \ 4 | %reldir%/+pkga/+pkgb/f1.m \ 5 | %reldir%/+pkga/+pkgb/f2.m \ 6 | %reldir%/@fhdr_derived/fhdr_derived.m \ 7 | %reldir%/@fhdr_other/fhdr_other.m \ 8 | %reldir%/@fhdr_other/getsize_arrayfun.m \ 9 | %reldir%/@fhdr_other/getsize_cellfun.m \ 10 | %reldir%/@fhdr_other/getsize_loop.m \ 11 | %reldir%/@fhdr_parent/fhdr_parent.m \ 12 | %reldir%/@fhdr_parent/numel.m \ 13 | %reldir%/bug51709_a.m \ 14 | %reldir%/bug51709_c.m \ 15 | %reldir%/derived-resolution.tst \ 16 | %reldir%/f1.m \ 17 | %reldir%/keyword.tst \ 18 | %reldir%/object-method.tst \ 19 | %reldir%/package-function.tst \ 20 | %reldir%/static-method.tst 21 | 22 | TEST_FILES += $(fcn_handle_TEST_FILES) 23 | -------------------------------------------------------------------------------- /CITATION: -------------------------------------------------------------------------------- 1 | To cite GNU Octave in publications use: 2 | 3 | John W. Eaton, David Bateman, Søren Hauberg, Rik Wehbring (2019). 4 | GNU Octave version 5.2.0 manual: a high-level interactive language for 5 | numerical computations. 6 | URL https://www.gnu.org/software/octave/doc/v5.2.0/ 7 | 8 | A BibTeX entry for LaTeX users is: 9 | 10 | @manual{, 11 | title = {{GNU Octave} version 5.2.0 manual: a high-level interactive language for numerical computations}, 12 | author = {John W. Eaton and David Bateman and S{\o}ren Hauberg and Rik Wehbring}, 13 | year = {2020}, 14 | url = {https://www.gnu.org/software/octave/doc/v5.2.0/}, 15 | } 16 | 17 | We have invested a lot of time and effort in creating GNU Octave, please 18 | cite it when using it. See also 'citation pkgname' for citing Octave 19 | packages. 20 | -------------------------------------------------------------------------------- /scripts/set/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += \ 2 | %reldir% \ 3 | %reldir%/private 4 | 5 | %canon_reldir%_PRIVATE_FCN_FILES = \ 6 | %reldir%/private/validsetargs.m 7 | 8 | %canon_reldir%_FCN_FILES = \ 9 | %reldir%/intersect.m \ 10 | %reldir%/ismember.m \ 11 | %reldir%/powerset.m \ 12 | %reldir%/setdiff.m \ 13 | %reldir%/setxor.m \ 14 | %reldir%/union.m \ 15 | %reldir%/unique.m 16 | 17 | %canon_reldir%dir = $(fcnfiledir)/set 18 | 19 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 20 | 21 | %canon_reldir%_privatedir = $(fcnfiledir)/set/private 22 | 23 | %canon_reldir%_private_DATA = $(%canon_reldir%_PRIVATE_FCN_FILES) 24 | 25 | FCN_FILES += \ 26 | $(%canon_reldir%_FCN_FILES) \ 27 | $(%canon_reldir%_PRIVATE_FCN_FILES) 28 | 29 | PKG_ADD_FILES += %reldir%/PKG_ADD 30 | 31 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 32 | -------------------------------------------------------------------------------- /test/classes/@Snork/subsref.m: -------------------------------------------------------------------------------- 1 | function b = subsref (snk, s) 2 | 3 | if (isempty (s)) 4 | error ('Snork: missing index'); 5 | end 6 | switch (s(1).type) 7 | case '()' 8 | ind = s(1).subs; 9 | if (numel (ind) ~= 1) 10 | error ('Snork: need exactly one index'); 11 | else 12 | b = snk.cack(ind{1}); 13 | end 14 | case '{}' 15 | ind = s(1).subs; 16 | if (numel (ind) ~= 1) 17 | error ('Snork: need exactly one index'); 18 | else 19 | b = snk.cack(ind{1}); 20 | end 21 | case '.' 22 | fld = s.subs; 23 | if (strcmp (fld, 'gick')) 24 | b = snk.gick; 25 | else 26 | error ('Snork/subsref: invalid property \"%s\"', fld); 27 | end 28 | otherwise 29 | error ('invalid subscript type'); 30 | end 31 | 32 | end 33 | -------------------------------------------------------------------------------- /scripts/profiler/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += %reldir% 2 | 3 | %canon_reldir%_FCN_FILES = \ 4 | %reldir%/profexplore.m \ 5 | %reldir%/profexport.m \ 6 | %reldir%/profile.m \ 7 | %reldir%/profshow.m 8 | 9 | %canon_reldir%dir = $(fcnfiledir)/profiler 10 | 11 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 12 | 13 | %canon_reldir%_htmldir = $(octetcdir)/profiler 14 | 15 | %canon_reldir%_html_DATA = \ 16 | %reldir%/html/flat.html \ 17 | %reldir%/html/flat_entry.html \ 18 | %reldir%/html/function.html \ 19 | %reldir%/html/hierarchical.html \ 20 | %reldir%/html/hierarchical_entry.html \ 21 | %reldir%/html/style.css 22 | 23 | FCN_FILES += \ 24 | $(%canon_reldir%_FCN_FILES) 25 | 26 | PKG_ADD_FILES += %reldir%/PKG_ADD 27 | 28 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 29 | 30 | scripts_EXTRA_DIST += \ 31 | $(%canon_reldir%_html_DATA) 32 | -------------------------------------------------------------------------------- /test/mk_bc_overloads_expected.m: -------------------------------------------------------------------------------- 1 | % this script is intended to be Matlab compatible 2 | % first, run the script 3 | % 4 | % ./build_bc_overloads_tests.sh overloads_only 5 | % 6 | % to generate the overloaded functions. 7 | % 8 | ex.double = 1; 9 | ex.single = single (1); 10 | ex.logical = true; 11 | ex.char = 'char'; 12 | ex.int8 = int8 (1); 13 | ex.int16 = int16 (1); 14 | ex.int32 = int32 (1); 15 | ex.int64 = int64 (1); 16 | ex.uint8 = uint8 (1); 17 | ex.uint16 = uint16 (1); 18 | ex.uint32 = uint32 (1); 19 | ex.uint64 = uint64 (1); 20 | ex.cell = {}; 21 | ex.struct = struct (); 22 | ex.function_handle = @numel; 23 | 24 | f = fieldnames (ex); 25 | n = numel (f); 26 | 27 | fid = fopen ('bc_overloads_expected','w'); 28 | fid 29 | for i = 1:n 30 | for j = 1:n 31 | s = tbcover (ex.(f{i}), ex.(f{j})); 32 | fprintf (fid, '%s %s %s\n', f{i}, f{j}, s); 33 | end 34 | end 35 | fclose (fid) 36 | -------------------------------------------------------------------------------- /doc/interpreter/cp-idx.txi: -------------------------------------------------------------------------------- 1 | @c Copyright (C) 1996-2019 John W. Eaton 2 | @c 3 | @c This file is part of Octave. 4 | @c 5 | @c Octave is free software: you can redistribute it and/or modify it 6 | @c under the terms of the GNU General Public License as published by 7 | @c the Free Software Foundation, either version 3 of the License, or 8 | @c (at your option) any later version. 9 | @c 10 | @c Octave is distributed in the hope that it will be useful, but 11 | @c WITHOUT ANY WARRANTY; without even the implied warranty of 12 | @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | @c GNU General Public License for more details. 14 | @c 15 | @c You should have received a copy of the GNU General Public License 16 | @c along with Octave; see the file COPYING. If not, see 17 | @c . 18 | 19 | @node Concept Index 20 | @unnumbered Concept Index 21 | 22 | @printindex cp 23 | -------------------------------------------------------------------------------- /doc/interpreter/fn-idx.txi: -------------------------------------------------------------------------------- 1 | @c Copyright (C) 1996-2019 John W. Eaton 2 | @c 3 | @c This file is part of Octave. 4 | @c 5 | @c Octave is free software: you can redistribute it and/or modify it 6 | @c under the terms of the GNU General Public License as published by 7 | @c the Free Software Foundation, either version 3 of the License, or 8 | @c (at your option) any later version. 9 | @c 10 | @c Octave is distributed in the hope that it will be useful, but 11 | @c WITHOUT ANY WARRANTY; without even the implied warranty of 12 | @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | @c GNU General Public License for more details. 14 | @c 15 | @c You should have received a copy of the GNU General Public License 16 | @c along with Octave; see the file COPYING. If not, see 17 | @c . 18 | 19 | @node Function Index 20 | @unnumbered Function Index 21 | 22 | @printindex fn 23 | -------------------------------------------------------------------------------- /doc/interpreter/op-idx.txi: -------------------------------------------------------------------------------- 1 | @c Copyright (C) 1996-2019 John W. Eaton 2 | @c 3 | @c This file is part of Octave. 4 | @c 5 | @c Octave is free software: you can redistribute it and/or modify it 6 | @c under the terms of the GNU General Public License as published by 7 | @c the Free Software Foundation, either version 3 of the License, or 8 | @c (at your option) any later version. 9 | @c 10 | @c Octave is distributed in the hope that it will be useful, but 11 | @c WITHOUT ANY WARRANTY; without even the implied warranty of 12 | @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | @c GNU General Public License for more details. 14 | @c 15 | @c You should have received a copy of the GNU General Public License 16 | @c along with Octave; see the file COPYING. If not, see 17 | @c . 18 | 19 | @node Operator Index 20 | @unnumbered Operator Index 21 | 22 | @printindex op 23 | -------------------------------------------------------------------------------- /etc/RELEASE.BUG_FIX_LIST: -------------------------------------------------------------------------------- 1 | The following bugs must be fixed prior to the next release. See also the [[6.0.0 Release Checklist]]. 2 | 3 |

Sign up for a bug by filling in the Owner field so people won't duplicate each other's work.

4 | 5 |

Use

 ... 
to cross an item off the list when it has been done.

6 | 7 |

Add

WON'T FIX
and the strike through tag for any bugs that will not be fixed in this round.

8 | 9 |
__TOC__
10 | 11 | ---- 12 | 13 | == Bugs marked as Crash == 14 | 15 | == Bugs marked Configuration and Build System == 16 | 17 | == Bugs with severity >= 4 == 18 | 19 | == Bugs marked as regressions == 20 | 21 | == Other Bugs == 22 | 23 | == Potentially excluded bugs == 24 | These bugs have been provisionally decided not to be blockers for 6.0.0. That doesn't mean they can't be fixed, if someone wants to fix them. 25 | -------------------------------------------------------------------------------- /examples/code/@polynomial/polynomial.m: -------------------------------------------------------------------------------- 1 | ## -*- texinfo -*- 2 | ## @deftypefn {} {} polynomial () 3 | ## @deftypefnx {} {} polynomial (@var{a}) 4 | ## Create a polynomial object representing the polynomial 5 | ## 6 | ## @example 7 | ## a0 + a1 * x + a2 * x^2 + @dots{} + an * x^n 8 | ## @end example 9 | ## 10 | ## @noindent 11 | ## from a vector of coefficients [a0 a1 a2 @dots{} an]. 12 | ## @end deftypefn 13 | 14 | function p = polynomial (a) 15 | 16 | if (nargin > 1) 17 | print_usage (); 18 | endif 19 | 20 | if (nargin == 0) 21 | p.poly = 0; 22 | p = class (p, "polynomial"); 23 | else 24 | if (isa (a, "polynomial")) 25 | p = a; 26 | elseif (isreal (a) && isvector (a)) 27 | p.poly = a(:).'; # force row vector 28 | p = class (p, "polynomial"); 29 | else 30 | error ("@polynomial: A must be a real vector"); 31 | endif 32 | endif 33 | 34 | endfunction 35 | -------------------------------------------------------------------------------- /scripts/prefs/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += \ 2 | %reldir% \ 3 | %reldir%/private 4 | 5 | %canon_reldir%_PRIVATE_FCN_FILES = \ 6 | %reldir%/private/loadprefs.m \ 7 | %reldir%/private/prefsfile.m \ 8 | %reldir%/private/saveprefs.m 9 | 10 | %canon_reldir%_FCN_FILES = \ 11 | %reldir%/addpref.m \ 12 | %reldir%/getpref.m \ 13 | %reldir%/ispref.m \ 14 | %reldir%/prefdir.m \ 15 | %reldir%/preferences.m \ 16 | %reldir%/rmpref.m \ 17 | %reldir%/setpref.m 18 | 19 | %canon_reldir%dir = $(fcnfiledir)/prefs 20 | 21 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 22 | 23 | %canon_reldir%_privatedir = $(fcnfiledir)/prefs/private 24 | 25 | %canon_reldir%_private_DATA = $(%canon_reldir%_PRIVATE_FCN_FILES) 26 | 27 | FCN_FILES += \ 28 | $(%canon_reldir%_FCN_FILES) \ 29 | $(%canon_reldir%_PRIVATE_FCN_FILES) 30 | 31 | PKG_ADD_FILES += %reldir%/PKG_ADD 32 | 33 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 34 | -------------------------------------------------------------------------------- /doc/interpreter/pr-idx.txi: -------------------------------------------------------------------------------- 1 | @c Copyright (C) 2017-2019 Rik Wehbring 2 | @c 3 | @c This file is part of Octave. 4 | @c 5 | @c Octave is free software: you can redistribute it and/or modify it 6 | @c under the terms of the GNU General Public License as published by 7 | @c the Free Software Foundation, either version 3 of the License, or 8 | @c (at your option) any later version. 9 | @c 10 | @c Octave is distributed in the hope that it will be useful, but 11 | @c WITHOUT ANY WARRANTY; without even the implied warranty of 12 | @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | @c GNU General Public License for more details. 14 | @c 15 | @c You should have received a copy of the GNU General Public License 16 | @c along with Octave; see the file COPYING. If not, see 17 | @c . 18 | 19 | @node Graphics Properties Index 20 | @unnumbered Graphics Properties Index 21 | 22 | @printindex pr 23 | -------------------------------------------------------------------------------- /doc/liboctave/error.texi: -------------------------------------------------------------------------------- 1 | @c Copyright (C) 1996-2019 John W. Eaton 2 | @c 3 | @c This file is part of Octave. 4 | @c 5 | @c Octave is free software: you can redistribute it and/or modify it 6 | @c under the terms of the GNU General Public License as published by 7 | @c the Free Software Foundation, either version 3 of the License, or 8 | @c (at your option) any later version. 9 | @c 10 | @c Octave is distributed in the hope that it will be useful, but 11 | @c WITHOUT ANY WARRANTY; without even the implied warranty of 12 | @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | @c GNU General Public License for more details. 14 | @c 15 | @c You should have received a copy of the GNU General Public License 16 | @c along with Octave; see the file COPYING. If not, see 17 | @c . 18 | 19 | @node Error Handling, Installation, Differential Algebraic Equations, Top 20 | @chapter Error Handling 21 | -------------------------------------------------------------------------------- /doc/liboctave/fn-idx.texi: -------------------------------------------------------------------------------- 1 | @c Copyright (C) 1996-2019 John W. Eaton 2 | @c 3 | @c This file is part of Octave. 4 | @c 5 | @c Octave is free software: you can redistribute it and/or modify it 6 | @c under the terms of the GNU General Public License as published by 7 | @c the Free Software Foundation, either version 3 of the License, or 8 | @c (at your option) any later version. 9 | @c 10 | @c Octave is distributed in the hope that it will be useful, but 11 | @c WITHOUT ANY WARRANTY; without even the implied warranty of 12 | @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | @c GNU General Public License for more details. 14 | @c 15 | @c You should have received a copy of the GNU General Public License 16 | @c along with Octave; see the file COPYING. If not, see 17 | @c . 18 | 19 | @node Function Index, , Concept Index, Top 20 | @unnumbered Function Index 21 | 22 | @printindex fn 23 | -------------------------------------------------------------------------------- /doc/liboctave/install.texi: -------------------------------------------------------------------------------- 1 | @c Copyright (C) 1996-2019 John W. Eaton 2 | @c 3 | @c This file is part of Octave. 4 | @c 5 | @c Octave is free software: you can redistribute it and/or modify it 6 | @c under the terms of the GNU General Public License as published by 7 | @c the Free Software Foundation, either version 3 of the License, or 8 | @c (at your option) any later version. 9 | @c 10 | @c Octave is distributed in the hope that it will be useful, but 11 | @c WITHOUT ANY WARRANTY; without even the implied warranty of 12 | @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | @c GNU General Public License for more details. 14 | @c 15 | @c You should have received a copy of the GNU General Public License 16 | @c along with Octave; see the file COPYING. If not, see 17 | @c . 18 | 19 | @node Installation, Bugs, Error Handling, Top 20 | @chapter Installation 21 | @cindex installation 22 | -------------------------------------------------------------------------------- /examples/code/structdemo.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | DEFUN_DLD (structdemo, args, , "Struct Demo") 5 | { 6 | if (args.length () != 2) 7 | print_usage (); 8 | 9 | if (! args(0).isstruct ()) 10 | error ("structdemo: ARG1 must be a struct"); 11 | 12 | octave_scalar_map arg0 = args(0).scalar_map_value (); 13 | //octave_map arg0 = args(0).map_value (); 14 | 15 | if (! args(1).is_string ()) 16 | error ("structdemo: ARG2 must be a character string"); 17 | 18 | std::string arg1 = args(1).string_value (); 19 | 20 | octave_value tmp = arg0.contents (arg1); 21 | //octave_value tmp = arg0.contents (arg1)(0); 22 | 23 | if (! tmp.is_defined ()) 24 | error ("structdemo: struct does not have a field named '%s'\n", 25 | arg1.c_str ()); 26 | 27 | octave_scalar_map st; 28 | 29 | st.assign ("selected", tmp); 30 | 31 | return octave_value (st); 32 | } 33 | -------------------------------------------------------------------------------- /doc/liboctave/cp-idx.texi: -------------------------------------------------------------------------------- 1 | @c Copyright (C) 1996-2019 John W. Eaton 2 | @c 3 | @c This file is part of Octave. 4 | @c 5 | @c Octave is free software: you can redistribute it and/or modify it 6 | @c under the terms of the GNU General Public License as published by 7 | @c the Free Software Foundation, either version 3 of the License, or 8 | @c (at your option) any later version. 9 | @c 10 | @c Octave is distributed in the hope that it will be useful, but 11 | @c WITHOUT ANY WARRANTY; without even the implied warranty of 12 | @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | @c GNU General Public License for more details. 14 | @c 15 | @c You should have received a copy of the GNU General Public License 16 | @c along with Octave; see the file COPYING. If not, see 17 | @c . 18 | 19 | @node Concept Index, Function Index, Bugs, Top 20 | @unnumbered Concept Index 21 | 22 | @printindex cp 23 | -------------------------------------------------------------------------------- /examples/code/myfevalf.f: -------------------------------------------------------------------------------- 1 | subroutine mexFunction (nlhs, plhs, nrhs, prhs) 2 | 3 | implicit none 4 | 5 | integer*4 nlhs, nrhs 6 | 7 | * The following will need to be integer*8 on 64-bit systems, otherwise 8 | * these variables won't be large enough to hold pointers... 9 | integer*4 plhs(*), prhs(*) 10 | 11 | integer*4 mxIsString, mxGetString, mxGetN, mexCallMATLAB 12 | integer*4 status, len 13 | character*100 str 14 | 15 | call mexPrintf ('Hello, World!') 16 | 17 | if (nrhs .lt. 1 .or. mxIsString (prhs(1)) .ne. 1) then 18 | call mexErrMsgTxt ('function name expected') 19 | endif 20 | 21 | len = mxGetN (prhs(1)) 22 | 23 | status = mxGetString (prhs(1), str, 100) 24 | 25 | call mexPrintf ('FORTRAN will call the interpreter now') 26 | 27 | status = mexCallMATLAB (nlhs, plhs, nrhs-1, prhs(2), str(1:len)) 28 | 29 | return 30 | end 31 | -------------------------------------------------------------------------------- /test/bug-45972.tst: -------------------------------------------------------------------------------- 1 | %!test 2 | %! ascii_filename = tempname (); 3 | %! binary_filename = tempname (); 4 | %! f = @ (x, y, varargin) x + y + varargin{1}; 5 | %! unwind_protect 6 | %! save ("-text", ascii_filename, "f"); 7 | %! save ("-binary", binary_filename, "f"); 8 | %! ascii = load (ascii_filename); 9 | %! binary = load (binary_filename); 10 | %! assert (f (1, 2, 3), ascii.f (1, 2, 3)); 11 | %! assert (f (1, 2, 3), binary.f (1, 2, 3)); 12 | %! unwind_protect_cleanup 13 | %! unlink (ascii_filename); 14 | %! unlink (binary_filename); 15 | %! end_unwind_protect 16 | 17 | %!testif HAVE_HDF5 18 | %! hdf5_filename = tempname (); 19 | %! f = @ (x, y, varargin) x + y + varargin{1}; 20 | %! unwind_protect 21 | %! save ("-hdf5", hdf5_filename, "f"); 22 | %! hdf5 = load (hdf5_filename); 23 | %! assert (f (1, 2, 3), hdf5.f (1, 2, 3)); 24 | %! unwind_protect_cleanup 25 | %! unlink (hdf5_filename); 26 | %! end_unwind_protect 27 | -------------------------------------------------------------------------------- /liboctave/external/slatec-fn/module.mk: -------------------------------------------------------------------------------- 1 | EXTERNAL_SOURCES += \ 2 | %reldir%/albeta.f \ 3 | %reldir%/alngam.f \ 4 | %reldir%/alnrel.f \ 5 | %reldir%/algams.f \ 6 | %reldir%/csevl.f \ 7 | %reldir%/d9gmit.f \ 8 | %reldir%/d9lgic.f \ 9 | %reldir%/d9lgit.f \ 10 | %reldir%/d9lgmc.f \ 11 | %reldir%/dcsevl.f \ 12 | %reldir%/dgamlm.f \ 13 | %reldir%/dgamma.f \ 14 | %reldir%/dgamr.f \ 15 | %reldir%/dlbeta.f \ 16 | %reldir%/dlgams.f \ 17 | %reldir%/dlngam.f \ 18 | %reldir%/dlnrel.f \ 19 | %reldir%/dpchim.f \ 20 | %reldir%/dpchst.f \ 21 | %reldir%/dpsifn.f \ 22 | %reldir%/gamlim.f \ 23 | %reldir%/gamma.f \ 24 | %reldir%/gamr.f \ 25 | %reldir%/initds.f \ 26 | %reldir%/inits.f \ 27 | %reldir%/pchim.f \ 28 | %reldir%/pchst.f \ 29 | %reldir%/psifn.f \ 30 | %reldir%/r9lgmc.f \ 31 | %reldir%/r9lgit.f \ 32 | %reldir%/r9gmit.f \ 33 | %reldir%/r9lgic.f 34 | 35 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 36 | -------------------------------------------------------------------------------- /test/classdef/foo_static_method_constant_property.m: -------------------------------------------------------------------------------- 1 | classdef foo_static_method_constant_property 2 | properties 3 | frequency; 4 | end 5 | properties (Constant = true) 6 | pie = pi; 7 | end 8 | methods 9 | function obj = foo_static_method_constant_property (f) 10 | if (nargin == 1) 11 | obj.frequency = f; 12 | elseif (nargin ~= 0) 13 | error ('foo_static_method_constant_property:SyntaxError', ... 14 | 'foo_static_method_constant_property: Invalid syntax') 15 | end 16 | end 17 | function res = cosine (obj, t) 18 | res = cos (obj.radians_per_cycle () * obj.frequency * t); 19 | end 20 | function res = sine (obj, t) 21 | res = sin (obj.radians_per_cycle () * obj.frequency * t); 22 | end 23 | end 24 | methods (Static) 25 | function res = radians_per_cycle () 26 | res = 2 * foo_static_method_constant_property.pie; 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /scripts/elfun/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += %reldir% 2 | 3 | %canon_reldir%_FCN_FILES = \ 4 | %reldir%/acosd.m \ 5 | %reldir%/acot.m \ 6 | %reldir%/acotd.m \ 7 | %reldir%/acoth.m \ 8 | %reldir%/acsc.m \ 9 | %reldir%/acscd.m \ 10 | %reldir%/acsch.m \ 11 | %reldir%/asec.m \ 12 | %reldir%/asecd.m \ 13 | %reldir%/asech.m \ 14 | %reldir%/asind.m \ 15 | %reldir%/atan2d.m \ 16 | %reldir%/atand.m \ 17 | %reldir%/cosd.m \ 18 | %reldir%/cot.m \ 19 | %reldir%/cotd.m \ 20 | %reldir%/coth.m \ 21 | %reldir%/csc.m \ 22 | %reldir%/cscd.m \ 23 | %reldir%/csch.m \ 24 | %reldir%/sec.m \ 25 | %reldir%/secd.m \ 26 | %reldir%/sech.m \ 27 | %reldir%/sind.m \ 28 | %reldir%/tand.m 29 | 30 | %canon_reldir%dir = $(fcnfiledir)/elfun 31 | 32 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 33 | 34 | FCN_FILES += $(%canon_reldir%_FCN_FILES) 35 | 36 | PKG_ADD_FILES += %reldir%/PKG_ADD 37 | 38 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 39 | -------------------------------------------------------------------------------- /examples/code/@polynomial/polynomial_superiorto.m: -------------------------------------------------------------------------------- 1 | ## -*- texinfo -*- 2 | ## @deftypefn {} {} polynomial () 3 | ## @deftypefnx {} {} polynomial (@var{a}) 4 | ## Create a polynomial object representing the polynomial 5 | ## 6 | ## @example 7 | ## a0 + a1 * x + a2 * x^2 + @dots{} + an * x^n 8 | ## @end example 9 | ## 10 | ## @noindent 11 | ## from a vector of coefficients [a0 a1 a2 @dots{} an]. 12 | ## @end deftypefn 13 | 14 | function p = polynomial (a) 15 | 16 | if (nargin > 1) 17 | print_usage (); 18 | endif 19 | 20 | if (nargin == 0) 21 | p.poly = [0]; 22 | p = class (p, "polynomial"); 23 | else 24 | if (strcmp (class (a), "polynomial")) 25 | p = a; 26 | elseif (isreal (a) && isvector (a)) 27 | p.poly = a(:).'; # force row vector 28 | p = class (p, "polynomial"); 29 | else 30 | error ("@polynomial: A must be a real vector"); 31 | endif 32 | endif 33 | 34 | superiorto ("double"); 35 | 36 | endfunction 37 | -------------------------------------------------------------------------------- /examples/code/paramdemo.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | DEFUN_DLD (paramdemo, args, nargout, "Parameter Check Demo") 4 | { 5 | if (args.length () != 1) 6 | print_usage (); 7 | 8 | NDArray m = args(0).array_value (); 9 | 10 | double min_val = -10.0; 11 | double max_val = 10.0; 12 | 13 | octave_stdout << "Properties of input array:\n"; 14 | 15 | if (m.any_element_is_negative ()) 16 | octave_stdout << " includes negative values\n"; 17 | 18 | if (m.any_element_is_inf_or_nan ()) 19 | octave_stdout << " includes Inf or NaN values\n"; 20 | 21 | if (m.any_element_not_one_or_zero ()) 22 | octave_stdout << " includes other values than 1 and 0\n"; 23 | 24 | if (m.all_elements_are_int_or_inf_or_nan ()) 25 | octave_stdout << " includes only int, Inf or NaN values\n"; 26 | 27 | if (m.all_integers (min_val, max_val)) 28 | octave_stdout << " includes only integers in [-10,10]\n"; 29 | 30 | return octave_value_list (); 31 | } 32 | -------------------------------------------------------------------------------- /scripts/specfun/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += %reldir% 2 | 3 | %canon_reldir%_FCN_FILES = \ 4 | %reldir%/beta.m \ 5 | %reldir%/betainc.m \ 6 | %reldir%/betaincinv.m \ 7 | %reldir%/betaln.m \ 8 | %reldir%/cosint.m \ 9 | %reldir%/ellipke.m \ 10 | %reldir%/expint.m \ 11 | %reldir%/factor.m \ 12 | %reldir%/factorial.m \ 13 | %reldir%/gammainc.m \ 14 | %reldir%/gammaincinv.m \ 15 | %reldir%/isprime.m \ 16 | %reldir%/lcm.m \ 17 | %reldir%/legendre.m \ 18 | %reldir%/nchoosek.m \ 19 | %reldir%/nthroot.m \ 20 | %reldir%/perms.m \ 21 | %reldir%/pow2.m \ 22 | %reldir%/primes.m \ 23 | %reldir%/reallog.m \ 24 | %reldir%/realpow.m \ 25 | %reldir%/realsqrt.m \ 26 | %reldir%/sinint.m 27 | 28 | %canon_reldir%dir = $(fcnfiledir)/specfun 29 | 30 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 31 | 32 | FCN_FILES += $(%canon_reldir%_FCN_FILES) 33 | 34 | PKG_ADD_FILES += %reldir%/PKG_ADD 35 | 36 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 37 | -------------------------------------------------------------------------------- /test/bug-45351/bug45351.m: -------------------------------------------------------------------------------- 1 | classdef bug45351 2 | 3 | properties (Hidden, SetAccess = protected) 4 | h1 = [];% handle to function 5 | h2 = [];% handle to function 6 | h3 = [];% handle to function 7 | end 8 | 9 | methods 10 | function self = bug45351 () 11 | self.h1 = @foo; 12 | self.h2 = @(self, n) self.foo (n); 13 | self.h3 = @(~, n) self.foo (n); 14 | end 15 | function [h1, h2, h3] = get_handles (self) 16 | h1 = self.h1; 17 | h2 = self.h2; 18 | h3 = self.h3; 19 | end 20 | function r = bar (self, hnum) 21 | switch (hnum) 22 | case 1 23 | r = self.h1 (self, hnum); 24 | case 2 25 | r = self.h2 (self, hnum); 26 | case 3 27 | r = self.h3 (self, hnum); 28 | end 29 | end 30 | end 31 | 32 | methods (Hidden, Access = protected) 33 | function r = foo (self, n) 34 | r = sprintf ('bug45351.foo: %d', n); 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /doc/liboctave/bugs.texi: -------------------------------------------------------------------------------- 1 | @c Copyright (C) 1996-2019 John W. Eaton 2 | @c 3 | @c This file is part of Octave. 4 | @c 5 | @c Octave is free software: you can redistribute it and/or modify it 6 | @c under the terms of the GNU General Public License as published by 7 | @c the Free Software Foundation, either version 3 of the License, or 8 | @c (at your option) any later version. 9 | @c 10 | @c Octave is distributed in the hope that it will be useful, but 11 | @c WITHOUT ANY WARRANTY; without even the implied warranty of 12 | @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | @c GNU General Public License for more details. 14 | @c 15 | @c You should have received a copy of the GNU General Public License 16 | @c along with Octave; see the file COPYING. If not, see 17 | @c . 18 | 19 | @node Bugs, Concept Index, Installation, Top 20 | @chapter Bugs 21 | @cindex bugs, known 22 | @cindex installation trouble 23 | @cindex known causes of trouble 24 | @cindex troubleshooting 25 | -------------------------------------------------------------------------------- /liboctave/external/amos/xzabs.f: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION FUNCTION XZABS(ZR, ZI) 2 | C***BEGIN PROLOGUE XZABS 3 | C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY 4 | C 5 | C XZABS COMPUTES THE ABSOLUTE VALUE OR MAGNITUDE OF A DOUBLE 6 | C PRECISION COMPLEX VARIABLE CMPLX(ZR,ZI) 7 | C 8 | C***ROUTINES CALLED (NONE) 9 | C***END PROLOGUE XZABS 10 | DOUBLE PRECISION ZR, ZI, U, V, Q, S 11 | U = DABS(ZR) 12 | V = DABS(ZI) 13 | S = U + V 14 | C----------------------------------------------------------------------- 15 | C S*1.0D0 MAKES AN UNNORMALIZED UNDERFLOW ON CDC MACHINES INTO A 16 | C TRUE FLOATING ZERO 17 | C----------------------------------------------------------------------- 18 | S = S*1.0D+0 19 | IF (S.EQ.0.0D+0) GO TO 20 20 | IF (U.GT.V) GO TO 10 21 | Q = U/V 22 | XZABS = V*DSQRT(1.D+0+Q*Q) 23 | RETURN 24 | 10 Q = V/U 25 | XZABS = U*DSQRT(1.D+0+Q*Q) 26 | RETURN 27 | 20 XZABS = 0.0D+0 28 | RETURN 29 | END 30 | -------------------------------------------------------------------------------- /scripts/profiler/html/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2016-2020 The Octave Project Developers 4 | 5 | See the file COPYRIGHT.md in the top-level directory of this 6 | distribution or . 7 | 8 | This file is part of Octave. 9 | 10 | Octave is free software: you can redistribute it and/or modify it 11 | under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | (at your option) any later version. 14 | 15 | Octave is distributed in the hope that it will be useful, but 16 | WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Octave; see the file COPYING. If not, see 22 | . 23 | 24 | */ 25 | 26 | tr:nth-of-type(odd) 27 | { 28 | background-color: #ccc; 29 | } 30 | -------------------------------------------------------------------------------- /libinterp/dldfcn/module-files: -------------------------------------------------------------------------------- 1 | # FILE|CPPFLAGS|LDFLAGS|LIBRARIES 2 | __delaunayn__.cc|$(QHULL_CPPFLAGS)|$(QHULL_LDFLAGS)|$(QHULL_LIBS) 3 | __fltk_uigetfile__.cc|$(FLTK_CPPFLAGS) $(FT2_CPPFLAGS)|$(FLTK_LDFLAGS) $(FT2_LDFLAGS)|$(FLTK_LIBS) $(FT2_LIBS) 4 | __glpk__.cc|$(GLPK_CPPFLAGS)|$(GLPK_LDFLAGS)|$(GLPK_LIBS) 5 | __init_fltk__.cc|$(FLTK_CPPFLAGS) $(FT2_CPPFLAGS) $(FONTCONFIG_CPPFLAGS)|$(FLTK_LDFLAGS) $(FT2_LDFLAGS)|$(FLTK_LIBS) $(FT2_LIBS) $(OPENGL_LIBS) 6 | __init_gnuplot__.cc|$(FT2_CPPFLAGS) $(FONTCONFIG_CPPFLAGS)|| 7 | __ode15__.cc|$(SUNDIALS_XCPPFLAGS)|$(SUNDIALS_XLDFLAGS)|$(SUNDIALS_XLIBS) 8 | __voronoi__.cc|$(QHULL_CPPFLAGS)|$(QHULL_LDFLAGS)|$(QHULL_LIBS) 9 | audiodevinfo.cc|$(PORTAUDIO_CPPFLAGS)|$(PORTAUDIO_LDFLAGS)|$(PORTAUDIO_LIBS) 10 | audioread.cc|$(SNDFILE_CPPFLAGS)|$(SNDFILE_LDFLAGS)|$(SNDFILE_LIBS) 11 | convhulln.cc|$(QHULL_CPPFLAGS)|$(QHULL_LDFLAGS)|$(QHULL_LIBS) 12 | fftw.cc|$(FFTW_XCPPFLAGS)|$(FFTW_XLDFLAGS)|$(FFTW_XLIBS) 13 | gzip.cc|$(Z_CPPFLAGS) $(BZ2_CPPFLAGS)|$(Z_LDFLAGS) $(BZ2_LDFLAGS)|$(Z_LIBS) $(BZ2_LIBS) 14 | -------------------------------------------------------------------------------- /liboctave/external/ranlib/lennob.f: -------------------------------------------------------------------------------- 1 | INTEGER*4 FUNCTION lennob(string) 2 | IMPLICIT INTEGER*4 (a-p,r-z),LOGICAL (q) 3 | C********************************************************************** 4 | C 5 | C INTEGER*4 FUNCTION LENNOB( STRING ) 6 | C LENgth NOt counting trailing Blanks 7 | C 8 | C 9 | C Function 10 | C 11 | C 12 | C Returns the length of STRING up to and including the last 13 | C non-blank character. 14 | C 15 | C 16 | C Arguments 17 | C 18 | C 19 | C STRING --> String whose length not counting trailing blanks 20 | C is returned. 21 | C 22 | C********************************************************************** 23 | CHARACTER*(*) string 24 | 25 | end = len(string) 26 | DO 20,i = end,1,-1 27 | IF (.NOT. (string(i:i).NE.' ')) GO TO 10 28 | lennob = i 29 | RETURN 30 | 31 | 10 CONTINUE 32 | 20 CONTINUE 33 | lennob = 0 34 | RETURN 35 | 36 | END 37 | -------------------------------------------------------------------------------- /doc/liboctave/intro.texi: -------------------------------------------------------------------------------- 1 | @c Copyright (C) 1996-2019 John W. Eaton 2 | @c 3 | @c This file is part of Octave. 4 | @c 5 | @c Octave is free software: you can redistribute it and/or modify it 6 | @c under the terms of the GNU General Public License as published by 7 | @c the Free Software Foundation, either version 3 of the License, or 8 | @c (at your option) any later version. 9 | @c 10 | @c Octave is distributed in the hope that it will be useful, but 11 | @c WITHOUT ANY WARRANTY; without even the implied warranty of 12 | @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | @c GNU General Public License for more details. 14 | @c 15 | @c You should have received a copy of the GNU General Public License 16 | @c along with Octave; see the file COPYING. If not, see 17 | @c . 18 | 19 | @node Introduction, Arrays, Copying, Top 20 | @chapter A Brief Introduction to Octave 21 | @cindex introduction 22 | 23 | This manual documents how to run, install and port Octave's C++ classes, 24 | and how to report bugs. 25 | -------------------------------------------------------------------------------- /scripts/optimization/module.mk: -------------------------------------------------------------------------------- 1 | FCN_FILE_DIRS += \ 2 | %reldir% \ 3 | %reldir%/private 4 | 5 | %canon_reldir%_PRIVATE_FCN_FILES = \ 6 | %reldir%/private/__fdjac__.m 7 | 8 | %canon_reldir%_FCN_FILES = \ 9 | %reldir%/__all_opts__.m \ 10 | %reldir%/fminbnd.m \ 11 | %reldir%/fminsearch.m \ 12 | %reldir%/fminunc.m \ 13 | %reldir%/fsolve.m \ 14 | %reldir%/fzero.m \ 15 | %reldir%/glpk.m \ 16 | %reldir%/humps.m \ 17 | %reldir%/lsqnonneg.m \ 18 | %reldir%/optimget.m \ 19 | %reldir%/optimset.m \ 20 | %reldir%/pqpnonneg.m \ 21 | %reldir%/qp.m \ 22 | %reldir%/sqp.m 23 | 24 | %canon_reldir%dir = $(fcnfiledir)/optimization 25 | 26 | %canon_reldir%_DATA = $(%canon_reldir%_FCN_FILES) 27 | 28 | %canon_reldir%_privatedir = $(fcnfiledir)/optimization/private 29 | 30 | %canon_reldir%_private_DATA = $(%canon_reldir%_PRIVATE_FCN_FILES) 31 | 32 | FCN_FILES += \ 33 | $(%canon_reldir%_FCN_FILES) \ 34 | $(%canon_reldir%_PRIVATE_FCN_FILES) 35 | 36 | PKG_ADD_FILES += %reldir%/PKG_ADD 37 | 38 | DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) 39 | -------------------------------------------------------------------------------- /examples/code/@polynomial/subsasgn.m: -------------------------------------------------------------------------------- 1 | function p = subsasgn (p, s, val) 2 | 3 | if (isempty (s)) 4 | error ("@polynomial/subsasgn: needs index"); 5 | endif 6 | 7 | switch (s(1).type) 8 | 9 | case "{}" 10 | ind = s(1).subs; 11 | if (numel (ind) != 1) 12 | error ("@polynomial/subsasgn: need exactly one index"); 13 | elseif (numel (s) != 1) 14 | error ("@polynomial/subsasgn: chained subscripts not allowed for {}"); 15 | endif 16 | 17 | if (isnumeric (ind{1})) 18 | p.poly(ind{1}+1) = val; 19 | else 20 | p.poly(ind{1}) = val; 21 | endif 22 | 23 | case "." 24 | fld = s(1).subs; 25 | if (! strcmp (fld, "poly")) 26 | error ('@polynomial/subsasgn: invalid property "%s"', fld); 27 | endif 28 | if (numel (s) == 1) 29 | p.poly = val; 30 | else 31 | p.poly = subsasgn (p.poly, s(2:end), val); 32 | endif 33 | 34 | otherwise 35 | error ("@polynomial/subsasgn: invalid subscript type"); 36 | 37 | endswitch 38 | 39 | endfunction 40 | -------------------------------------------------------------------------------- /examples/code/unwinddemo.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void 5 | my_err_handler (const char *fmt, ...) 6 | { 7 | // Do nothing!! 8 | } 9 | 10 | void 11 | my_err_with_id_handler (const char *id, const char *fmt, ...) 12 | { 13 | // Do nothing!! 14 | } 15 | 16 | DEFUN_DLD (unwinddemo, args, nargout, "Unwind Demo") 17 | { 18 | if (args.length () < 2) 19 | print_usage (); 20 | 21 | NDArray a = args(0).array_value (); 22 | NDArray b = args(1).array_value (); 23 | 24 | // Declare unwind_protect frame which lasts as long as 25 | // the variable frame has scope. 26 | octave::unwind_protect frame; 27 | frame.add_fcn (set_liboctave_warning_handler, 28 | current_liboctave_warning_handler); 29 | 30 | frame.add_fcn (set_liboctave_warning_with_id_handler, 31 | current_liboctave_warning_with_id_handler); 32 | 33 | set_liboctave_warning_handler (my_err_handler); 34 | set_liboctave_warning_with_id_handler (my_err_with_id_handler); 35 | 36 | return octave_value (quotient (a, b)); 37 | } 38 | -------------------------------------------------------------------------------- /doc/refcard/refcard-a4.tex: -------------------------------------------------------------------------------- 1 | % refcard-a4.tex 2 | % 3 | % Make a reference card that will fit on A4 paper. 4 | % 5 | % Copyright (C) 1996-2020 The Octave Project Developers 6 | % 7 | % See the file COPYRIGHT.md in the top-level directory of this 8 | % distribution or . 9 | % 10 | % This file is part of Octave. 11 | % 12 | % Octave is free software: you can redistribute it and/or modify it 13 | % under the terms of the GNU General Public License as published by 14 | % the Free Software Foundation, either version 3 of the License, or 15 | % (at your option) any later version. 16 | % 17 | % Octave is distributed in the hope that it will be useful, but 18 | % WITHOUT ANY WARRANTY; without even the implied warranty of 19 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | % GNU General Public License for more details. 21 | % 22 | % You should have received a copy of the GNU General Public License 23 | % along with Octave; see the file COPYING. If not, see 24 | % . 25 | 26 | \def\refcardsize{a4} 27 | \input refcard.tex 28 | -------------------------------------------------------------------------------- /etc/icons/org.octave.Octave.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=GNU Octave 3 | Comment=Interactive programming environment for numerical computations 4 | Comment[ca]=Entorn de programació interactiva per a càlculs numèrics 5 | Comment[de]=Interaktive Programmierumgebung für numerische Berechnungen 6 | Comment[es]=Entorno de programación interactiva para cálculos numéricos 7 | Comment[fr]=Environnement de programmation interactif pour le calcul numérique 8 | Comment[it]=Ambiente di programmazione interattivo per il calcolo numerico 9 | Comment[ja]=数値計算のための対話的なプログラミング環境 10 | Comment[nl]=Interactieve programmeeromgeving voor numerieke berekeningen 11 | Comment[pt]=Ambiente de programação interativo para computação numérica 12 | Comment[zh]=数值计算交互式编程环境 13 | TryExec=%OCTAVE_PREFIX%/bin/octave 14 | Exec=%OCTAVE_PREFIX%/bin/octave --gui %f 15 | Icon=octave 16 | Terminal=false 17 | Type=Application 18 | Categories=Education;Science;Math; 19 | StartupNotify=false 20 | StartupWMClass=GNU Octave 21 | MimeType=text/x-octave;text/x-matlab; 22 | Keywords=science;math;matrix;numerical computation;plotting; 23 | -------------------------------------------------------------------------------- /liboctave/external/amos/zuchk.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE ZUCHK(YR, YI, NZ, ASCLE, TOL) 2 | C***BEGIN PROLOGUE ZUCHK 3 | C***REFER TO ZSERI,ZUOIK,ZUNK1,ZUNK2,ZUNI1,ZUNI2,ZKSCL 4 | C 5 | C Y ENTERS AS A SCALED QUANTITY WHOSE MAGNITUDE IS GREATER THAN 6 | C EXP(-ALIM)=ASCLE=1.0E+3*D1MACH(1)/TOL. THE TEST IS MADE TO SEE 7 | C IF THE MAGNITUDE OF THE REAL OR IMAGINARY PART WOULD UNDERFLOW 8 | C WHEN Y IS SCALED (BY TOL) TO ITS PROPER VALUE. Y IS ACCEPTED 9 | C IF THE UNDERFLOW IS AT LEAST ONE PRECISION BELOW THE MAGNITUDE 10 | C OF THE LARGEST COMPONENT; OTHERWISE THE PHASE ANGLE DOES NOT HAVE 11 | C ABSOLUTE ACCURACY AND AN UNDERFLOW IS ASSUMED. 12 | C 13 | C***ROUTINES CALLED (NONE) 14 | C***END PROLOGUE ZUCHK 15 | C 16 | C COMPLEX Y 17 | DOUBLE PRECISION ASCLE, SS, ST, TOL, WR, WI, YR, YI 18 | INTEGER NZ 19 | NZ = 0 20 | WR = DABS(YR) 21 | WI = DABS(YI) 22 | ST = DMIN1(WR,WI) 23 | IF (ST.GT.ASCLE) RETURN 24 | SS = DMAX1(WR,WI) 25 | ST = ST/TOL 26 | IF (SS.LT.ST) NZ = 1 27 | RETURN 28 | END 29 | --------------------------------------------------------------------------------