Skip to content

Commit

Permalink
Remove old workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
cbm755 committed Oct 26, 2023
1 parent 0a0821f commit 62d4d9f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 24 deletions.
10 changes: 4 additions & 6 deletions inst/@sym/ezmesh.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%% Copyright (C) 2019 Colin B. Macdonald
%% Copyright (C) 2019, 2023 Colin B. Macdonald
%%
%% This file is part of OctSymPy.
%%
Expand Down Expand Up @@ -81,12 +81,10 @@
assert(length(thissym) <= 2, ...
'ezmesh: parameterized: functions should have at most two inputs');
if (isempty(thissym))
% a number, create a constant function in a dummy variable
% (0*t works around some Octave oddity on 3.8 and hg Dec 2014)
thisf = inline(sprintf('%g + 0*t', double(varargin{i})), 't');
%thisf = @(t) 0*t + double(varargin{i}); % no
% constant function
thisf = function_handle (varargin{i}, 'vars', sym ('t'));
else
% check variables match (sanity check)
% check variables match over each function
if (isempty(firstsym))
firstsym = thissym;
else
Expand Down
8 changes: 3 additions & 5 deletions inst/@sym/ezplot.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,10 @@
assert(length(thissym) <= 2, ...
'ezplot: plotting curves: functions should have at most two inputs');
if (isempty(thissym))
% a number, create a constant function in a dummy variable
% (0*t works around some Octave oddity on 3.8 and hg Dec 2014)
thisf = inline(sprintf('%g + 0*t', double(varargin{i})), 't');
%thisf = @(t) 0*t + double(varargin{i}); % no
% constant function
thisf = function_handle (varargin{i}, 'vars', sym ('t'));
else
% check variables match (sanity check)
% check variables match over each function
if (isempty(firstsym))
firstsym = thissym;
else
Expand Down
10 changes: 4 additions & 6 deletions inst/@sym/ezplot3.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%% Copyright (C) 2014-2016 Colin B. Macdonald
%% Copyright (C) 2014-2016, 2023 Colin B. Macdonald
%%
%% This file is part of OctSymPy.
%%
Expand Down Expand Up @@ -66,12 +66,10 @@
assert(length(thissym) <= 1, ...
'ezplot3: plotting curves: functions should have at most one input');
if (isempty(thissym))
% a number, create a constant function in a dummy variable
% (0*t works around some Octave oddity on 3.8 and hg Dec 2014)
thisf = inline(sprintf('%g + 0*t', double(varargin{i})), 't');
%thisf = @(t) 0*t + double(varargin{i}); % no
% constant function
thisf = function_handle (varargin{i}, 'vars', sym ('t'));
else
% check variables match (sanity check)
% check variables match over each function
if (isempty(firstsym))
firstsym = thissym;
else
Expand Down
12 changes: 5 additions & 7 deletions inst/@sym/ezsurf.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%% Copyright (C) 2016-2017, 2019 Colin B. Macdonald
%% Copyright (C) 2016-2017, 2019, 2023 Colin B. Macdonald
%%
%% This file is part of OctSymPy.
%%
Expand Down Expand Up @@ -80,13 +80,11 @@
thissym = symvar(varargin{i});
assert(length(thissym) <= 2, ...
'ezsurf: parameterized: functions should have at most two inputs');
if (isempty(thissym))
% a number, create a constant function in a dummy variable
% (0*t works around some Octave oddity on 3.8 and hg Dec 2014)
thisf = inline(sprintf('%g + 0*t', double(varargin{i})), 't');
%thisf = @(t) 0*t + double(varargin{i}); % no
if (isempty (thissym))
% constant function
thisf = function_handle (varargin{i}, 'vars', sym ('t'));
else
% check variables match (sanity check)
% check variables match over each function
if (isempty(firstsym))
firstsym = thissym;
else
Expand Down

0 comments on commit 62d4d9f

Please sign in to comment.