# HG changeset patch # User John W. Eaton # Date 1476735970 14400 # Node ID 859d48b5648db5af297cc2eada1b4829a50e3455 # Parent ddbc3f9f0136f59e109e69f5666a7682402494ef# Parent c44d57c0a925b8ccf2ba9c8e95a9e153fb0b1e5f maint: Merge stable to default. diff -r ddbc3f9f0136 -r 859d48b5648d scripts/gui/inputdlg.m --- a/scripts/gui/inputdlg.m Sun Oct 16 12:25:24 2016 -0700 +++ b/scripts/gui/inputdlg.m Mon Oct 17 16:26:10 2016 -0400 @@ -99,11 +99,11 @@ if (nargin > 3) defaults = varargin{3}; endif - + if (nargin > 4) warning ("inputdlg: 5th 'options' argument ignored"); endif - + ## specification of text field sizes as in Matlab ## Matlab requires a matrix for linespec, not a cell array... ## rc = [1,10; 2,20; 3,30]; diff -r ddbc3f9f0136 -r 859d48b5648d scripts/image/colormap.m --- a/scripts/image/colormap.m Sun Oct 16 12:25:24 2016 -0700 +++ b/scripts/image/colormap.m Mon Oct 17 16:26:10 2016 -0400 @@ -76,7 +76,7 @@ ## @item prism @tab cyclic 6-color map of red, orange, yellow, green, blue, violet. ## @item ------------- @tab --------------------------------------------------------------------------------------------- ## @item white @tab all white colormap (no colors). -## @end multitable +## @end multitable ## @seealso{viridis, jet, cubehelix, hsv, rainbow, hot, cool, spring, summer, autumn, winter, gray, bone, copper, pink, ocean, colorcube, flag, lines, prism, white} ## @end deftypefn diff -r ddbc3f9f0136 -r 859d48b5648d scripts/ode/odeset.m --- a/scripts/ode/odeset.m Sun Oct 16 12:25:24 2016 -0700 +++ b/scripts/ode/odeset.m Mon Oct 17 16:26:10 2016 -0400 @@ -33,20 +33,117 @@ ## default values. If no output argument is requested, display a list of ## the common ODE solver options along with their default value. ## -## If called with string input arguments @var{"field1"}, @var{"field2"}, -## @dots{} identifying valid ODE options then return a new ODE options -## structure with all possible fields initialized @strong{and} set the values -## of the fields @var{"field1"}, @var{"field2"}, @dots{} to the values -## @var{value1}, @var{value2}, @dots{} +## If called with name-value input argument pairs @var{"field1"}, +## @var{"value1"}, @var{"field2"}, @var{"value2"}, @dots{} return a new +## ODE options structure with all the most common option fields +## initialized, @strong{and} set the values of the fields @var{"field1"}, +## @var{"field2"}, @dots{} to the values @var{value1}, @var{value2}, +## @dots{}. ## -## If called with an input structure @var{oldstruct} then overwrite the values -## of the options @var{"field1"}, @var{"field2"}, @dots{} with new values -## @var{value1}, @var{value2}, @dots{} and return the modified structure. +## If called with an input structure @var{oldstruct} then overwrite the +## values of the options @var{"field1"}, @var{"field2"}, @dots{} with +## new values @var{value1}, @var{value2}, @dots{} and return the +## modified structure. ## ## When called with two input ODE options structures @var{oldstruct} and -## @var{newstruct} overwrite all values from the structure @var{oldstruct} with -## new values from the structure @var{newstruct}. Empty values in -## @var{newstruct} will not overwrite values in @var{oldstruct}. +## @var{newstruct} overwrite all values from the structure +## @var{oldstruct} with new values from the structure @var{newstruct}. +## Empty values in @var{newstruct} will not overwrite values in +## @var{oldstruct}. +## +## The most commonly used ODE options, which are always assigned a value +## by @qcode{odeset}, are the following: +## +## @table @asis +## @item AbsTol +## Absolute error tolerance. +## +## @item BDF +## Use BDF formulas in implicit multistep methods. +## +## @item Events +## Event function. An event function must have the form +## @code{[value, isterminal, direction] = my_events_f (t, y)} +## +## @item InitialSlope +## Consistent initial slope vector for DAE solvers. +## +## @item InitialStep +## Initial time step size. +## +## @item Jacobian +## Jacobian matrix, specified as a constant matrix or a function of +## time and state. +## +## @item JConstant +## Specify whether the Jacobian is a constant matrix or depends on the +## state. +## +## @item JPattern +## If the Jacobian matrix is sparse and non-constant but maintains a +## constant sparsity pattern, specify the sparsity pattern. +## +## @item Mass +## Mass matrix, specified as a constant matrix or a function of +## time and state. +## +## @item MassConstant +## Specify whether the mass matrix is a constant matrix or depends on +## the state. +## +## @item MassSingular +## Specify whether the mass matrix is singular. Accepted values include +## @qcode{"yes"}, @qcode{"no"}, @qcode{"maybe"}. +## +## @item MaxOrder +## Maximum order of formula. +## +## @item MaxStep +## Maximum time step value. +## +## @item MStateDependence +## Specify whether the mass matrix depends on the state or only on time. +## +## @item MvPattern +## If the mass matrix is sparse and non-constant but maintains a +## constant sparsity pattern, specify the sparsity pattern. +## +## @item NonNegative +## Specify elements of the state vector that are expected to remain +## nonnegative during the simulation. +## +## @item NormControl +## Control error relative to the 2-norm of the solution, rather than its +## absolute value. +## +## @item OutputFcn +## Function to monitor the state during the simulation. For the form of +## the function to use see @qcode{odeplot}. +## +## @item OutputSel +## Indices of elements of the state vector to be passed to the output +## monitoring function. +## +## @item Refine +## Specify whether output should be returned only at the end of each +## time step or also at intermediate time instances. The value should be +## a scalar indicating the number of equally spaced time points to use +## within each timestep at which to return output. +## +## @item RelTol +## Relative error tolerance. +## +## @item Stats +## Print solver statistics after simulation. +## +## @item Vectorized +## Specify whether @qcode{odefun} can be passed multiple values of the +## state at once. +## +## @end table +## +## Field names that are not in the above list are also accepted and +## added to the result structure. ## ## @seealso{odeget} ## @end deftypefn @@ -56,6 +153,8 @@ persistent p; if (isempty (p)) + ## FIXME: Add an inexact match option once it is available in inputParser. + ## See bug #49364. p = inputParser (); p.addParameter ("AbsTol", []); p.addParameter ("BDF", []); @@ -193,13 +292,19 @@ %! warning (wstate); %! end_unwind_protect +## FIXME: Add an inexact match option once it is available in inputParser. +## See bug #49364. +## %!warning odeset ("Rel", 1); +## %!error odeset ("Initial", 1) + ## Test input validation %!error odeset ("opt1") %!error odeset (1, 1) %!error odeset (odeset (), "opt1") %!error odeset (odeset (), 1, 1) -## FIXME: Add inexact match option +##FIXME: Add not exact match option ## %!warning odeset ("Rel", 1); ## %!error odeset ("Initial", 1) + diff -r ddbc3f9f0136 -r 859d48b5648d scripts/plot/draw/light.m --- a/scripts/plot/draw/light.m Sun Oct 16 12:25:24 2016 -0700 +++ b/scripts/plot/draw/light.m Mon Oct 17 16:26:10 2016 -0400 @@ -415,7 +415,7 @@ %! val(x>0 & (y-x)>0) = NaN; %! fv = isosurface (x, y, z, val, iso); %! vn = isonormals (x, y, z, val, fv.vertices); -%! +%! %! clf; %! subplot (2, 3, 1); %! view (140, 20); @@ -425,7 +425,7 @@ %! hl = light ("Position", [1 0 .5]); %! lighting gouraud %! title ({"BackFaceLighting", '"reverselit"', 'isonormals(...,"negate")'}); -%! +%! %! subplot (2, 3, 2); %! view (140, 20); %! axis equal @@ -434,7 +434,7 @@ %! hl = light ("Position", [1 0 .5]); %! lighting gouraud %! title ({"BackFaceLighting", '"lit"', 'isonormals(...,"negate")'}); -%! +%! %! subplot (2, 3, 3); %! view (140, 20); %! axis equal @@ -443,7 +443,7 @@ %! hl = light ("Position", [1 0 .5]); %! lighting gouraud %! title ({"BackFaceLighting", '"unlit"', 'isonormals(...,"negate")'}); -%! +%! %! subplot (2, 3, 4); %! view (140, 20); %! axis equal @@ -452,7 +452,7 @@ %! hl = light ("Position", [1 0 .5]); %! lighting gouraud %! title ({"BackFaceLighting", '"reverselit"', "isonormals(...)"}); -%! +%! %! subplot (2, 3, 5); %! view (140, 20); %! axis equal @@ -461,7 +461,7 @@ %! hl = light ("Position", [1 0 .5]); %! lighting gouraud %! title ({"BackFaceLighting", '"lit"', "isonormals(...)"}); -%! +%! %! subplot (2, 3, 6); %! view (140, 20); %! axis equal diff -r ddbc3f9f0136 -r 859d48b5648d scripts/plot/draw/private/__scatter__.m --- a/scripts/plot/draw/private/__scatter__.m Sun Oct 16 12:25:24 2016 -0700 +++ b/scripts/plot/draw/private/__scatter__.m Mon Oct 17 16:26:10 2016 -0400 @@ -388,7 +388,8 @@ endif filled = ! strcmp (get (h, "markerfacecolor"), "none"); s = get (h, "sizedata"); - s = sqrt (s); # size adjustment for visual compatibility w/Matlab + ## Size adjustment for visual compatibility with Matlab. + s = sqrt (s); if (numel (s) == 1) s = repmat (s, numel (x), 1); endif diff -r ddbc3f9f0136 -r 859d48b5648d scripts/plot/draw/rose.m --- a/scripts/plot/draw/rose.m Sun Oct 16 12:25:24 2016 -0700 +++ b/scripts/plot/draw/rose.m Mon Oct 17 16:26:10 2016 -0400 @@ -98,7 +98,7 @@ if (isvector (counts)) counts = counts(:); endif - + binedge = binctr(1:end-1) + diff (binctr) / 2; binedge = [binedge ; zeros(size(binedge)); zeros(size(binedge)); binedge]; binedge = binedge(:); diff -r ddbc3f9f0136 -r 859d48b5648d scripts/plot/util/__gnuplot_drawnow__.m --- a/scripts/plot/util/__gnuplot_drawnow__.m Sun Oct 16 12:25:24 2016 -0700 +++ b/scripts/plot/util/__gnuplot_drawnow__.m Mon Oct 17 16:26:10 2016 -0400 @@ -223,9 +223,9 @@ otherwise size_str = ""; endswitch - if (strcmp (term, "x11") || strcmp (term, "windows") + if (strcmp (term, "x11") || strcmp (term, "windows") || (strcmp (term, "wxt") - && __gnuplot_has_feature__ ("wxt_figure_position")) + && __gnuplot_has_feature__ ("wxt_figure_position")) || (strcmp (term, "qt") && __gnuplot_has_feature__ ("qt_figure_position"))) ## X11/Windows/qt/wxt (=> ver 5) allows the window to be positioned. diff -r ddbc3f9f0136 -r 859d48b5648d scripts/plot/util/private/__gnuplot_draw_axes__.m --- a/scripts/plot/util/private/__gnuplot_draw_axes__.m Sun Oct 16 12:25:24 2016 -0700 +++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m Mon Oct 17 16:26:10 2016 -0400 @@ -1666,9 +1666,9 @@ ## Wrap view correctly to match Matlab if (axis_obj.view(2) <= 90) rot_x = 90 - axis_obj.view(2); - else + else rot_x = axis_obj.view(2) - 90; - endif + endif rot_x = mod (rot_x, 360); while (rot_x < 0) rot_x += 360; @@ -1677,7 +1677,7 @@ rot_z = axis_obj.view(1); else rot_z = axis_obj.view(1) + 180; - endif + endif rot_z = mod (rot_z, 360); while (rot_z < 0) rot_z += 360;