Mercurial > octave
changeset 28892:3cac3ceb9629
maint: Use coding style with parentheses after function name to distinguish from a variable.
* audiorecorder.m, interp3.m, iscolormap.m, spinmap.m, expm.m, copyfile.m,
delete.m, edit.m, inputParser.m, movefile.m, narginchk.m, nargoutchk.m,
publish.m, tar.m, tempdir.m, ode23.m, ode23s.m, ode45.m, odeplot.m, sqp.m,
matlabroot.m, savepath.m, expand_rel_paths.m, datetick.m, lighting.m,
material.m, rticks.m, shading.m, thetaticks.m, view.m, xticklabels.m, xticks.m,
yticklabels.m, yticks.m, zticklabels.m, zticks.m, colorbar.m, errorbar.m,
hist.m, isocaps.m, light.m, line.m, patch.m, shrinkfaces.m, stairs.m,
surface.m, allchild.m, ancestor.m, cla.m, clf.m, findobj.m, gca.m, hggroup.m,
isgraphics.m, ishandle.m, print.m, struct2hdl.m, arch_rnd.m, speed.m, clock.m:
Use parentheses '()' after function invocation to distinguish between a variable
and a function.
line wrap: on
line diff
--- a/scripts/audio/@audiorecorder/audiorecorder.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/audio/@audiorecorder/audiorecorder.m Sat Oct 10 17:55:56 2020 -0700 @@ -88,14 +88,14 @@ %! assert (size (data)(2), 2); %!testif HAVE_PORTAUDIO; audiodevinfo (1) > 0 -%! recorder = audiorecorder; +%! recorder = audiorecorder (); %! set (recorder, {"SampleRate", "Tag", "UserData"}, {8000, "tag", [1, 2; 3, 4]}); %! assert (recorder.SampleRate, 8000); %! assert (recorder.Tag, "tag"); %! assert (recorder.UserData, [1, 2; 3, 4]); %!testif HAVE_PORTAUDIO; audiodevinfo (1) > 0 -%! recorder = audiorecorder; +%! recorder = audiorecorder (); %! settable = set (recorder); %! settable.SampleRate = 8000; %! settable.Tag = "tag"; @@ -106,7 +106,7 @@ %! assert (recorder.UserData, [1, 2; 3, 4]); %!testif HAVE_PORTAUDIO; audiodevinfo (1) > 0 -%! recorder = audiorecorder; +%! recorder = audiorecorder (); %! recorder.SampleRate = 8000; %! recorder.Tag = "tag"; %! recorder.UserData = [1, 2; 3, 4];
--- a/scripts/general/interp3.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/general/interp3.m Sat Oct 10 17:55:56 2020 -0700 @@ -255,7 +255,7 @@ %! assert (vi, vi2); %!test # extrapolation -%! X=[0,0.5,1]; Y=X; Z=X; +%! X = [0,0.5,1]; Y=X; Z=X; %! V = zeros (3,3,3); %! V(:,:,1) = [1 3 5; 3 5 7; 5 7 9]; %! V(:,:,2) = V(:,:,1) + 2;
--- a/scripts/image/iscolormap.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/image/iscolormap.m Sat Oct 10 17:55:56 2020 -0700 @@ -41,7 +41,7 @@ function retval = iscolormap (cmap) if (nargin < 1) - print_usage; + print_usage (); endif retval = (isnumeric (cmap) && isreal (cmap)
--- a/scripts/image/spinmap.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/image/spinmap.m Sat Oct 10 17:55:56 2020 -0700 @@ -54,8 +54,8 @@ cmap = cmap_orig = get (gcf (), "colormap"); - t0 = clock; - while (etime (clock, t0) < t) + t0 = clock (); + while (etime (clock (), t0) < t) cmap = shift (cmap, inc, 1); set (gcf (), "colormap", cmap); drawnow ();
--- a/scripts/linear-algebra/expm.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/linear-algebra/expm.m Sat Oct 10 17:55:56 2020 -0700 @@ -103,7 +103,7 @@ n = rows (A); id = eye (n); ## Trace reduction. - A(A == -Inf) = -realmax; + A(A == -Inf) = -realmax (); trshift = trace (A) / n; if (trshift > 0) A -= trshift * id;
--- a/scripts/miscellaneous/copyfile.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/miscellaneous/copyfile.m Sat Oct 10 17:55:56 2020 -0700 @@ -165,10 +165,10 @@ %!test %! unwind_protect -%! f1 = tempname; +%! f1 = tempname (); %! tmp_var = pi; %! save (f1, "tmp_var"); -%! f2 = tempname; +%! f2 = tempname (); %! assert (copyfile (f1, f2)); %! assert (exist (f2, "file")); %! fid = fopen (f1, "rb");
--- a/scripts/miscellaneous/delete.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/miscellaneous/delete.m Sat Oct 10 17:55:56 2020 -0700 @@ -73,7 +73,7 @@ %!test %! unwind_protect -%! file = tempname; +%! file = tempname (); %! tmp_var = pi; %! save (file, "tmp_var"); %! assert (exist (file, "file"));
--- a/scripts/miscellaneous/edit.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/miscellaneous/edit.m Sat Oct 10 17:55:56 2020 -0700 @@ -143,7 +143,7 @@ "MODE", "async", "EDITINPLACE", true); ## Make sure the stateval variables survive "clear functions". - mlock; + mlock (); ## Get default editor every time in case the user has changed it FUNCTION.EDITOR = [EDITOR() " %s"];
--- a/scripts/miscellaneous/inputParser.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/miscellaneous/inputParser.m Sat Oct 10 17:55:56 2020 -0700 @@ -650,7 +650,7 @@ ## check alternative method (obj, ...) API %!function p2 = create_p2 (); -%! p2 = inputParser; +%! p2 = inputParser (); %! addRequired (p2, "req1", @(x) ischar (x)); %! addOptional (p2, "op1", "val", @(x) any (strcmp (x, {"val", "foo"}))); %! addOptional (p2, "op2", 78, @(x) x > 50); @@ -677,13 +677,13 @@ ## We must not perform validation of default values %!test <*45837> -%! p = inputParser; +%! p = inputParser (); %! p.addParameter ("Dir", [], @ischar); %! p.parse (); %! assert (p.Results.Dir, []); %!test -%! p = inputParser; +%! p = inputParser (); %! p.addParameter ("positive", -1, @(x) x > 5); %! p.parse (); %! assert (p.Results.positive, -1); @@ -701,7 +701,7 @@ ## With more Parameters to test StructExpand %!function p3 = create_p3 (); -%! p3 = inputParser; +%! p3 = inputParser (); %! addOptional (p3, "op1", "val", @(x) any (strcmp (x, {"val", "foo"}))); %! addOptional (p3, "op2", 78, @(x) x > 50); %! addSwitch (p3, "verbose"); @@ -745,14 +745,14 @@ ## Some simple tests for addParamValue since all the other ones use add ## addParameter but they use the same codepath. %!test -%! p = inputParser; +%! p = inputParser (); %! addParameter (p, "line", "tree", @(x) any (strcmp (x, {"tree", "circle"}))); %! addParameter (p, "color", "red", @(x) any (strcmp (x, {"red", "green"}))); %! p.parse ("line", "circle"); %! assert ({p.Results.line, p.Results.color}, {"circle", "red"}) %!test -%! p = inputParser; +%! p = inputParser (); %! p.addParameter ("foo", "bar", @ischar); %! p.parse (); %! assert (p.Results, struct ("foo", "bar")) @@ -812,7 +812,7 @@ %! assert (p.Results, struct ("op1", "line", "line", "circle")) %!test <*50752> -%! p = inputParser; +%! p = inputParser (); %! p.addOptional ("op1", "val1"); %! p.addSwitch ("line"); %! p.parse ("line"); @@ -820,7 +820,7 @@ %! assert (p.Results.line, true) %!test -%! p = inputParser; +%! p = inputParser (); %! p.addParameter ("a", []); %! p.addParameter ("b", []); %! p.parse ("a", 1); @@ -829,7 +829,7 @@ %! assert (p.UsingDefaults, {"a"}); %!test -%! p = inputParser; +%! p = inputParser (); %! p.addParameter ("b", []); %! p.KeepUnmatched = true; %! p.parse ("a", 1); @@ -839,7 +839,7 @@ ## Test for patch #9241 %!error<failed validation of A with ischar> -%! p = inputParser; +%! p = inputParser (); %! p.addParameter ("a", [], @ischar); %! p.parse ("a", 1);
--- a/scripts/miscellaneous/movefile.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/miscellaneous/movefile.m Sat Oct 10 17:55:56 2020 -0700 @@ -181,14 +181,14 @@ %!test %! unwind_protect -%! f1 = tempname; +%! f1 = tempname (); %! tmp_var = pi; %! save (f1, "tmp_var"); %! fid = fopen (f1, "rb"); %! assert (fid >= 0); %! orig_data = fread (fid); %! fclose (fid); -%! f2 = tempname; +%! f2 = tempname (); %! assert (movefile (f1, f2)); %! assert (! exist (f1, "file")); %! assert (exist (f2, "file"));
--- a/scripts/miscellaneous/narginchk.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/miscellaneous/narginchk.m Sat Oct 10 17:55:56 2020 -0700 @@ -43,7 +43,7 @@ function narginchk (minargs, maxargs) if (nargin != 2) - print_usage; + print_usage (); elseif (! isnumeric (minargs) || ! isscalar (minargs)) error ("narginchk: MINARGS must be a numeric scalar"); elseif (! isnumeric (maxargs) || ! isscalar (maxargs))
--- a/scripts/miscellaneous/nargoutchk.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/miscellaneous/nargoutchk.m Sat Oct 10 17:55:56 2020 -0700 @@ -103,7 +103,7 @@ endif else - print_usage; + print_usage (); endif endfunction
--- a/scripts/miscellaneous/publish.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/miscellaneous/publish.m Sat Oct 10 17:55:56 2020 -0700 @@ -209,7 +209,7 @@ ## Check file to be in Octave's load path [file_path, file_name, file_ext] = fileparts (file); if (isempty (file_path)) - file_path = pwd; + file_path = pwd (); endif if (exist ([file_name, file_ext]) != 2) error (["publish: " file " is not in the load path"]);
--- a/scripts/miscellaneous/tar.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/miscellaneous/tar.m Sat Oct 10 17:55:56 2020 -0700 @@ -133,7 +133,7 @@ %! if (! exist (tarname, "file")) %! error ("tar archive file cannot be found!"); %! endif -%! outdir = tempname; +%! outdir = tempname (); %! untar (tarname, outdir); %! fid = fopen (fullfile (outdir, fname1), "rt"); %! assert (fid >= 0);
--- a/scripts/miscellaneous/tempdir.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/miscellaneous/tempdir.m Sat Oct 10 17:55:56 2020 -0700 @@ -37,7 +37,7 @@ dirname = getenv ("TMPDIR"); if (isempty (dirname)) - dirname = P_tmpdir; + dirname = P_tmpdir (); endif if (! strcmp (dirname(end), filesep))
--- a/scripts/ode/ode23.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/ode/ode23.m Sat Oct 10 17:55:56 2020 -0700 @@ -378,7 +378,7 @@ %! [t, y] = ode23 (@fpol, [0 2], [2 0], 12, 13, "KL"); %! assert ([t(end), y(end,:)], [2, fref], 1e-3); %!test # empty OdePkg structure *but* extra input arguments -%! opt = odeset; +%! opt = odeset (); %! [t, y] = ode23 (@fpol, [0 2], [2 0], opt, 12, 13, "KL"); %! assert ([t(end), y(end,:)], [2, fref], 1e-2); %!test # Solve another anonymous function below zero
--- a/scripts/ode/ode23s.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/ode/ode23s.m Sat Oct 10 17:55:56 2020 -0700 @@ -412,7 +412,7 @@ %! [t, y] = ode23s (@fpol, [0 2], [2 0], 12, 13, "KL"); %! assert ([t(end), y(end,:)], [2, fref], 1e-3); %!test # empty OdePkg structure *but* extra input arguments -%! opt = odeset; +%! opt = odeset (); %! [t, y] = ode23s (@fpol, [0 2], [2 0], opt, 12, 13, "KL"); %! assert ([t(end), y(end,:)], [2, fref], 1e-2); %!test # InitialStep option
--- a/scripts/ode/ode45.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/ode/ode45.m Sat Oct 10 17:55:56 2020 -0700 @@ -384,7 +384,7 @@ %! [t, y] = ode45 (@fpol, [0 2], [2 0], 12, 13, "KL"); %! assert ([t(end), y(end,:)], [2, fref], 1e-2); %!test # empty ODEOPT structure *but* extra input arguments -%! opt = odeset; +%! opt = odeset (); %! [t, y] = ode45 (@fpol, [0 2], [2 0], opt, 12, 13, "KL"); %! assert ([t(end), y(end,:)], [2, fref], 1e-2); %!test # Solve another anonymous function below zero
--- a/scripts/ode/odeplot.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/ode/odeplot.m Sat Oct 10 17:55:56 2020 -0700 @@ -91,7 +91,7 @@ for i = 1:num_lines set (hlines(i), "xdata", told, "ydata", yold(i,:)); endfor - drawnow; + drawnow (); retval = false;
--- a/scripts/optimization/sqp.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/optimization/sqp.m Sat Oct 10 17:55:56 2020 -0700 @@ -297,7 +297,7 @@ if (isa (x0, "single")) globals.lb = tmp_lb = -realmax ("single"); else - globals.lb = tmp_lb = -realmax; + globals.lb = tmp_lb = -realmax (); endif else error ("sqp: invalid lower bound"); @@ -312,7 +312,7 @@ if (isa (x0, "single")) globals.ub = tmp_ub = realmax ("single"); else - globals.ub = tmp_ub = realmax; + globals.ub = tmp_ub = realmax (); endif else error ("sqp: invalid upper bound");
--- a/scripts/path/matlabroot.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/path/matlabroot.m Sat Oct 10 17:55:56 2020 -0700 @@ -34,7 +34,7 @@ function retval = matlabroot () - retval = OCTAVE_HOME; + retval = OCTAVE_HOME (); endfunction
--- a/scripts/path/savepath.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/path/savepath.m Sat Oct 10 17:55:56 2020 -0700 @@ -201,7 +201,7 @@ %! endif %! status = savepath (fname); %! assert (status == 0); -%! old_dir = pwd; +%! old_dir = pwd (); %! unwind_protect %! cd (test_dir); %! if (exist (fullfile (pwd, ".octaverc")))
--- a/scripts/pkg/private/expand_rel_paths.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/pkg/private/expand_rel_paths.m Sat Oct 10 17:55:56 2020 -0700 @@ -26,7 +26,7 @@ function pkg_list = expand_rel_paths (pkg_list) ## Prepend location of OCTAVE_HOME to install directories - loc = OCTAVE_HOME; + loc = OCTAVE_HOME (); for i = 1:numel (pkg_list) ## Be sure to only prepend OCTAVE_HOME to pertinent package paths if (strncmpi (pkg_list{i}.dir, "__OH__", 6))
--- a/scripts/plot/appearance/datetick.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/datetick.m Sat Oct 10 17:55:56 2020 -0700 @@ -94,7 +94,7 @@ %! xlabel ("year"); %! ylabel ("average price"); %! title ("datetick() with MM/DD/YY format"); -%! ax = gca; +%! ax = gca (); %! set (ax, "xtick", datenum (1990:5:2005,1,1)); %! datetick ("x", 2, "keepticks"); %! set (ax, "ytick", 12:16);
--- a/scripts/plot/appearance/lighting.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/lighting.m Sat Oct 10 17:55:56 2020 -0700 @@ -184,10 +184,10 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! ha = axes; +%! ha = axes (); %! hm = mesh (sombrero ()); -%! hp = patch; -%! hs = surface; +%! hp = patch (); +%! hs = surface (); %! lighting flat %! assert (get (hp, "facelighting"), "flat"); %! assert (get (hs, "facelighting"), "flat");
--- a/scripts/plot/appearance/material.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/material.m Sat Oct 10 17:55:56 2020 -0700 @@ -227,8 +227,8 @@ %!test %! hf = figure ("Visible", "off"); %! unwind_protect -%! hp = patch; -%! hs = surface; +%! hp = patch (); +%! hs = surface (); %! material dull %! assert (get (hp, "ambientstrength"), 0.3); %! assert (get (hs, "ambientstrength"), 0.3);
--- a/scripts/plot/appearance/rticks.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/rticks.m Sat Oct 10 17:55:56 2020 -0700 @@ -120,7 +120,7 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! polar (linspace (0, pi, 20), rand (20,1)); -%! hax = gca; +%! hax = gca (); %! ticks = rticks; %! assert (rticks (hax), ticks); %! rticks (hax, [0 0.25 0.75 1 2]); @@ -135,7 +135,7 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! polar (linspace (0, pi, 20), 1:20); -%! hax = gca; +%! hax = gca (); %! fail ("rticks (-1, [0 1])", "HAX must be a handle to an axes"); %! fail ("tmp = rticks (hax, [0 1])", "too many output arguments"); %! fail ("tmp = rticks (hax, 'mode')", "MODE is not yet implemented");
--- a/scripts/plot/appearance/shading.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/shading.m Sat Oct 10 17:55:56 2020 -0700 @@ -265,10 +265,10 @@ %!test %! hf = figure ("Visible", "off"); %! unwind_protect -%! ha = axes; +%! ha = axes (); %! hm = mesh (sombrero ()); -%! hp = patch; -%! hs = surface; +%! hp = patch (); +%! hs = surface (); %! shading interp; %! assert (get (hp, "facecolor"), "interp"); %! assert (get (hs, "facecolor"), "interp");
--- a/scripts/plot/appearance/thetaticks.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/thetaticks.m Sat Oct 10 17:55:56 2020 -0700 @@ -124,7 +124,7 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! polar (linspace (0, pi, 20), rand (20,1)); -%! hax = gca; +%! hax = gca (); %! ticks = thetaticks; %! assert (thetaticks (hax), ticks); %! thetaticks (hax, [0 45 90 135 180]); @@ -139,7 +139,7 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! polar (linspace (0, pi, 20), 1:20); -%! hax = gca; +%! hax = gca (); %! fail ("thetaticks (-1, [0 1])", "HAX must be a handle to an axes"); %! fail ("tmp = thetaticks (hax, [0 1])", "too many output arguments"); %! fail ("tmp = thetaticks (hax, 'mode')", "MODE is not yet implemented");
--- a/scripts/plot/appearance/view.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/view.m Sat Oct 10 17:55:56 2020 -0700 @@ -110,13 +110,13 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! plot3 ([0,1], [0,1], [0,1]); -%! [az, el] = view; +%! [az, el] = view (); %! assert ([az, el], [-37.5, 30], eps); %! view (2); -%! [az, el] = view; +%! [az, el] = view (); %! assert ([az, el], [0, 90], eps); %! view ([1 1 0]); -%! [az, el] = view; +%! [az, el] = view (); %! assert ([az, el], [135, 0], eps); %! unwind_protect_cleanup %! close (hf); @@ -125,11 +125,11 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! line; -%! [az, el] = view; +%! line (); +%! [az, el] = view (); %! assert ([az, el], [0, 90], eps); %! view (3); -%! [az, el] = view; +%! [az, el] = view (); %! assert ([az, el], [-37.5, 30], eps); %! unwind_protect_cleanup %! close (hf);
--- a/scripts/plot/appearance/xticklabels.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/xticklabels.m Sat Oct 10 17:55:56 2020 -0700 @@ -142,7 +142,7 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! set (gca, "xticklabelmode", "auto"); -%! hax = gca; +%! hax = gca (); %! vals1 = xticklabels; %! assert (xticklabels (hax), vals1); %! mode1 = xticklabels ("mode"); @@ -164,7 +164,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! hax = gca; +%! hax = gca (); %! fail ("xticklabels (-1, {})", "HAX must be a handle to an axes"); %! fail ("tmp = xticklabels (hax, {'A','B'})", "too many output arguments"); %! fail ("tmp = xticklabels (hax, [0, 1])", "too many output arguments");
--- a/scripts/plot/appearance/xticks.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/xticks.m Sat Oct 10 17:55:56 2020 -0700 @@ -122,7 +122,7 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! set (gca, "xtickmode", "auto"); -%! hax = gca; +%! hax = gca (); %! vals1 = xticks; %! assert (xticks (hax), vals1); %! mode1 = xticks ("mode"); @@ -143,7 +143,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! hax = gca; +%! hax = gca (); %! fail ("xticks (-1, [0 1])", "HAX must be a handle to an axes"); %! fail ("tmp = xticks (hax, [0 1])", "too many output arguments"); %! fail ("tmp = xticks (hax, 'auto')", "too many .* for arg: auto");
--- a/scripts/plot/appearance/yticklabels.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/yticklabels.m Sat Oct 10 17:55:56 2020 -0700 @@ -142,7 +142,7 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! set (gca, "yticklabelmode", "auto"); -%! hax = gca; +%! hax = gca (); %! vals1 = yticklabels; %! assert (yticklabels (hax), vals1); %! mode1 = yticklabels ("mode"); @@ -164,7 +164,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! hax = gca; +%! hax = gca (); %! fail ("yticklabels (-1, {})", "HAX must be a handle to an axes"); %! fail ("tmp = yticklabels (hax, {'A','B'})", "too many output arguments"); %! fail ("tmp = yticklabels (hax, [0, 1])", "too many output arguments");
--- a/scripts/plot/appearance/yticks.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/yticks.m Sat Oct 10 17:55:56 2020 -0700 @@ -124,7 +124,7 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! set (gca, "ytickmode", "auto"); -%! hax = gca; +%! hax = gca (); %! vals1 = yticks; %! assert (yticks (hax), vals1); %! mode1 = yticks ("mode"); @@ -145,7 +145,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! hax = gca; +%! hax = gca (); %! fail ("yticks (-1, [0 1])", "HAX must be a handle to an axes"); %! fail ("tmp = yticks (hax, [0 1])", "too many output arguments"); %! fail ("tmp = yticks (hax, 'auto')", "too many .* for arg: auto");
--- a/scripts/plot/appearance/zticklabels.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/zticklabels.m Sat Oct 10 17:55:56 2020 -0700 @@ -80,7 +80,7 @@ arg = varargin{2}; otherwise - print_usage; + print_usage (); endswitch @@ -132,7 +132,7 @@ endswitch else - print_usage; + print_usage (); endif endfunction @@ -142,7 +142,7 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! set (gca, "zticklabelmode", "auto"); -%! hax = gca; +%! hax = gca (); %! vals1 = zticklabels; %! assert (zticklabels (hax), vals1); %! mode1 = zticklabels ("mode"); @@ -164,7 +164,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! hax = gca; +%! hax = gca (); %! fail ("zticklabels (-1, {})", "HAX must be a handle to an axes"); %! fail ("tmp = zticklabels (hax, {'A','B'})", "too many output arguments"); %! fail ("tmp = zticklabels (hax, [0, 1])", "too many output arguments");
--- a/scripts/plot/appearance/zticks.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/appearance/zticks.m Sat Oct 10 17:55:56 2020 -0700 @@ -122,7 +122,7 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! set (gca, "ztickmode", "auto"); -%! hax = gca; +%! hax = gca (); %! vals1 = zticks; %! assert (zticks (hax), vals1); %! mode1 = zticks ("mode"); @@ -143,7 +143,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! hax = gca; +%! hax = gca (); %! fail ("zticks (-1, [0 1])", "HAX must be a handle to an axes"); %! fail ("tmp = zticks (hax, [0 1])", "too many output arguments"); %! fail ("tmp = zticks (hax, 'auto')", "too many .* for arg: auto");
--- a/scripts/plot/draw/colorbar.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/draw/colorbar.m Sat Oct 10 17:55:56 2020 -0700 @@ -859,7 +859,7 @@ %!demo %! clf; %! colormap ("default"); -%! axes; +%! axes (); %! colorbar (); %! hold on; %! contour (peaks ());
--- a/scripts/plot/draw/errorbar.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/draw/errorbar.m Sat Oct 10 17:55:56 2020 -0700 @@ -247,7 +247,7 @@ ## Invisible figure used for tests %!shared hf, hax %! hf = figure ("visible", "off"); -%! hax = axes; +%! hax = axes (); %!error errorbar () %!error errorbar (1)
--- a/scripts/plot/draw/hist.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/draw/hist.m Sat Oct 10 17:55:56 2020 -0700 @@ -126,7 +126,7 @@ else x = (-floor ((n-1)/2):ceil ((n-1)/2)) + min_val; endif - x = x.'; # Convert to matrix; + x = x.'; # Convert to matrix else ## Parse bin specification argument x = varargin{iarg++}; @@ -152,7 +152,7 @@ else x = (-floor ((n-1)/2):ceil ((n-1)/2)) + min_val; endif - x = x.'; # Convert to matrix; + x = x.'; # Convert to matrix elseif (isvector (x)) equal_bin_spacing = strcmp (typeinfo (x), "range"); if (! equal_bin_spacing) @@ -394,7 +394,7 @@ %!error <number of bins NBINS must be positive> hist (1, 0) %!test %! hf = figure ("visible", "off"); -%! hax = gca; +%! hax = gca (); %! unwind_protect %! fail ("hist (hax, 1, [2 1 0])", "warning", "bin values X not sorted"); %! unwind_protect_cleanup
--- a/scripts/plot/draw/isocaps.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/draw/isocaps.m Sat Oct 10 17:55:56 2020 -0700 @@ -376,7 +376,7 @@ %! [x, y, z] = meshgrid (lin, lin, lin); %! v = abs ((x-0.45).^2 + (y-0.55).^2 + (z-0.8).^2); %! hf = clf; -%! ha = axes; +%! ha = axes (); %! view (3); box off; %! fvc_iso = isosurface (x, y, z, v, isoval); %! cmap = get (hf, "Colormap");
--- a/scripts/plot/draw/light.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/draw/light.m Sat Oct 10 17:55:56 2020 -0700 @@ -592,7 +592,7 @@ %!test %! hf = figure ("visible", "off"); -%! ha = gca; +%! ha = gca (); %! unwind_protect %! h = light (ha, "Position", [1 2 3], "Color", "r"); %! assert (get (h, "Position"), [1 2 3]);
--- a/scripts/plot/draw/line.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/draw/line.m Sat Oct 10 17:55:56 2020 -0700 @@ -123,7 +123,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! h = line; +%! h = line (); %! assert (findobj (hf, "type", "line"), h); %! assert (get (h, "xdata"), [0 1], eps); %! assert (get (h, "ydata"), [0 1], eps);
--- a/scripts/plot/draw/patch.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/draw/patch.m Sat Oct 10 17:55:56 2020 -0700 @@ -287,7 +287,7 @@ %! assert (get (h, "linewidth"), get (0, "defaultpatchlinewidth"), eps); %! assert (get (h, "marker"), get (0, "defaultpatchmarker")); %! assert (get (h, "markersize"), get (0, "defaultpatchmarkersize")); -%! hl = light; +%! hl = light (); %! assert (get (h, "facelighting"), "flat"); %! assert (get (h, "facenormals"), [0 0 1], eps); %! assert (get (h, "vertexnormals"), []);
--- a/scripts/plot/draw/shrinkfaces.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/draw/shrinkfaces.m Sat Oct 10 17:55:56 2020 -0700 @@ -215,7 +215,7 @@ %! axis auto; # Kludge required for Octave %! axis equal; %! view (115, 30); -%! drawnow; +%! drawnow (); %! shrinkfaces (p, 0.6); %! title ("shrinkfaces() on 3-D complex shapes");
--- a/scripts/plot/draw/stairs.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/draw/stairs.m Sat Oct 10 17:55:56 2020 -0700 @@ -329,7 +329,7 @@ ## Invisible figure used for tests %!shared hf, hax %! hf = figure ("visible", "off"); -%! hax = axes; +%! hax = axes (); %!error stairs () %!error <Y must be a numeric 2-D vector> stairs (hax, {1})
--- a/scripts/plot/draw/surface.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/draw/surface.m Sat Oct 10 17:55:56 2020 -0700 @@ -206,7 +206,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! h = surface; +%! h = surface (); %! assert (findobj (hf, "type", "surface"), h); %! assert (get (h, "xdata"), 1:3, eps); %! assert (get (h, "ydata"), (1:3)', eps);
--- a/scripts/plot/util/allchild.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/util/allchild.m Sat Oct 10 17:55:56 2020 -0700 @@ -57,7 +57,7 @@ %! toolkit = graphics_toolkit ("qt"); %! hf = figure ("visible", "off"); %! unwind_protect -%! l = line; +%! l = line (); %! kids = allchild (hf); %! assert (get (kids, "type"), ... %! {"axes"; "uitoolbar"; "uimenu"; "uimenu"; "uimenu"});
--- a/scripts/plot/util/ancestor.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/util/ancestor.m Sat Oct 10 17:55:56 2020 -0700 @@ -91,7 +91,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! hl = line; +%! hl = line (); %! assert (ancestor (hl, "axes"), gca); %! assert (ancestor (hl, "figure"), hf); %! unwind_protect_cleanup
--- a/scripts/plot/util/cla.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/util/cla.m Sat Oct 10 17:55:56 2020 -0700 @@ -50,12 +50,12 @@ function cla (hax, do_reset = false) if (nargin == 0) - hax = gca; + hax = gca (); elseif (nargin == 1) if (isscalar (hax) && isaxes (hax)) ## Normal case : cla (hax) without reset elseif (ischar (hax) && strcmpi (hax, "reset")) - hax = gca; + hax = gca (); do_reset = true; else print_usage (); @@ -94,7 +94,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! hax = gca; +%! hax = gca (); %! plot (hax, 1:10); %! assert (get (hax, "colororderindex"), 2); %! set (hax, "ticklabelinterpreter", "none");
--- a/scripts/plot/util/clf.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/util/clf.m Sat Oct 10 17:55:56 2020 -0700 @@ -52,14 +52,14 @@ if (nargin > 2) print_usage (); elseif (nargin == 0) - hfig = gcf; + hfig = gcf (); do_reset = false; elseif (nargin == 1) if (isscalar (varargin{1}) && isfigure (varargin{1})) hfig = varargin{1}; do_reset = false; elseif (ischar (varargin{1}) && strcmpi (varargin{1}, "reset")) - hfig = gcf; + hfig = gcf (); do_reset = true; else print_usage (); @@ -119,7 +119,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! l = line; +%! l = line (); %! assert (! isempty (get (gcf, "children"))); %! clf; %! assert (isempty (get (gcf, "children")));
--- a/scripts/plot/util/findobj.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/util/findobj.m Sat Oct 10 17:55:56 2020 -0700 @@ -329,7 +329,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! l = line; +%! l = line (); %! obj = findobj (hf, "type", "line"); %! assert (l, obj); %! assert (gca, findobj (hf, "type", "axes"));
--- a/scripts/plot/util/gca.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/util/gca.m Sat Oct 10 17:55:56 2020 -0700 @@ -67,7 +67,7 @@ %!test %! hf = figure ("visible", "off"); -%! ax = axes; +%! ax = axes (); %! unwind_protect %! assert (gca, ax); %! unwind_protect_cleanup
--- a/scripts/plot/util/hggroup.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/util/hggroup.m Sat Oct 10 17:55:56 2020 -0700 @@ -68,7 +68,7 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! h = hggroup; +%! h = hggroup (); %! assert (findobj (hf, "type", "hggroup"), h); %! assert (get (h, "type"), "hggroup"); %! unwind_protect_cleanup
--- a/scripts/plot/util/isgraphics.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/util/isgraphics.m Sat Oct 10 17:55:56 2020 -0700 @@ -61,8 +61,8 @@ %! assert (isgraphics (hf, "figure")); %! assert (! isgraphics (-hf)); %! assert (! isgraphics (hf, "foo")); -%! l = line; -%! ax = gca; +%! l = line (); +%! ax = gca (); %! assert (isgraphics (ax)); %! assert (isgraphics (ax, "axes")); %! assert (! isgraphics (-ax)); @@ -71,17 +71,17 @@ %! assert (isgraphics (l, "line")); %! assert (! isgraphics (-l)); %! assert (! isgraphics (l, "foo")); -%! p = patch; +%! p = patch (); %! assert (isgraphics (p)); %! assert (isgraphics (p, "patch")); %! assert (! isgraphics (-p)); %! assert (! isgraphics (p, "foo")); -%! s = surface; +%! s = surface (); %! assert (isgraphics (s)); %! assert (isgraphics (s, "surface")); %! assert (! isgraphics (-s)); %! assert (! isgraphics (s, "foo")); -%! t = text; +%! t = text (); %! assert (isgraphics (t)); %! assert (isgraphics (t, "text")); %! assert (! isgraphics (-t)); @@ -91,7 +91,7 @@ %! assert (isgraphics (i, "image")); %! assert (! isgraphics (-i)); %! assert (! isgraphics (i, "foo")); -%! hg = hggroup; +%! hg = hggroup (); %! assert (isgraphics (hg)); %! assert (isgraphics (hg, "hggroup")); %! assert (! isgraphics (-hg));
--- a/scripts/plot/util/ishandle.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/util/ishandle.m Sat Oct 10 17:55:56 2020 -0700 @@ -55,8 +55,8 @@ %! unwind_protect %! assert (ishandle (hf)); %! assert (! ishandle (-hf)); -%! ax = gca; -%! l = line; +%! ax = gca (); +%! l = line (); %! assert (ishandle (ax)); %! assert (! ishandle (-ax)); %! assert (ishandle ([l, -1, ax, hf]), logical ([1, 0, 1, 1]));
--- a/scripts/plot/util/print.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/util/print.m Sat Oct 10 17:55:56 2020 -0700 @@ -812,7 +812,7 @@ ## DOS Shell: ## gs.exe [...] -sOutputFile=<filein> - & epstool -bbox -preview-tiff <filein> <fileout> & del <filein> - ## Unix Shell; + ## Unix Shell: ## cat > <filein> ; epstool -bbox -preview-tiff <filein> <fileout> ; rm <filein> dos_shell = (ispc () && ! isunix ());
--- a/scripts/plot/util/struct2hdl.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/plot/util/struct2hdl.m Sat Oct 10 17:55:56 2020 -0700 @@ -160,11 +160,11 @@ if (strcmp (s.properties.tag, "legend")) s.properties.tag = ""; s.properties.userdata = []; - par = gcf; + par = gcf (); elseif (strcmp (s.properties.tag, "colorbar")) s.properties.tag = ""; s.properties.userdata = []; - par = gcf; + par = gcf (); endif endif ## remove read only properties
--- a/scripts/signal/arch_rnd.m Sat Oct 10 16:32:20 2020 -0700 +++ b/scripts/signal/arch_rnd.m Sat Oct 10 17:55:56 2020 -0700 @@ -83,13 +83,13 @@ y = zeros (t, 1); h(1) = a(1); - e(1) = sqrt (h(1)) * randn; + e(1) = sqrt (h(1)) * randn (); y(1) = b(1) + e(1); for t = 2:m ta = min ([t, la]); h(t) = a(1) + a(2:ta) * e(t-ta+1:t-1).^2; - e(t) = sqrt (h(t)) * randn; + e(t) = sqrt (h(t)) * randn (); tb = min ([t, lb]); y(t) = b(1) + b(2:tb) * y(t-tb+1:t-1) + e(t); endfor @@ -97,7 +97,7 @@ if (t > m) for t = m+1:t h(t) = a(1) + a(2:la) * e(t-la+1:t-1).^2; - e(t) = sqrt (h(t)) * randn; + e(t) = sqrt (h(t)) * randn (); y(t) = b(1) + b(2:lb) * y(t-tb+1:t-1) + e(t); endfor endif