Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0232943
octave: use static methods instead of class-related functions
cbm755 Nov 7, 2014
5c48eb4
octave: compact/loose display support
cbm755 Jan 20, 2018
612cb15
octave: TEMPORARY dumb fixes to make Octave work
cbm755 Jan 20, 2018
d1c5725
octave: TEMPORARY dumb hack: always return [-1, 1] for domain
cbm755 Jan 20, 2018
45a8b00
octave: workaround subsref and property fighting over "domain"
cbm755 Jan 20, 2018
25ec0ef
octave: workaround for f.domain(j)
cbm755 Jan 20, 2018
36df36c
silence warning by reordering switch
cbm755 Jan 20, 2018
f45b91d
octave: TEMPORARY: remove the domain class and replace with domain.m
cbm755 Jan 20, 2018
22aac25
octave: temporary workaround for f.funs{j}
cbm755 Jan 20, 2018
08d18a2
octave: add some notes, bugs lists, etc
cbm755 Jan 21, 2018
69a4d97
MWEs for chebfun and tests
Aug 1, 2024
10be951
add test for 2*x and x*2, the former fails
cbm755 Apr 28, 2025
3995888
Update octave_notes.txt
kolmanthomas Apr 28, 2025
b1165b5
Workaround for subsref issue with domain
kolmanthomas Jul 15, 2025
b5a9a93
Temp fix for 2*chebfun() to work
kolmanthomas May 24, 2025
5bbd4a3
Add method to check if Octave is being used
kolmanthomas Jul 25, 2025
e011664
Revert "Temp fix for 2*chebfun() to work"
kolmanthomas Jul 27, 2025
1f885b6
Revert "Workaround for subsref issue with domain"
kolmanthomas Jul 27, 2025
0c818ab
Revert "octave: workaround subsref and property fighting over "domain""
kolmanthomas Jul 27, 2025
e5c7114
Added comma delimiter for cell array of anon functions.
kolmanthomas Jul 27, 2025
7d39d75
Revert "octave: TEMPORARY dumb hack: always return [-1, 1] for domain"
kolmanthomas Jul 27, 2025
58c33cf
Revert "octave: temporary workaround for f.funs{j}"
kolmanthomas Jul 27, 2025
5c3f285
Fix unintended behaviour making f a complex-valued chebfun.
kolmanthomas Jul 28, 2025
56bc622
Added a new function to handle 'verLessThan('matlab', version)' calls.
kolmanthomas Jul 29, 2025
3db9aff
Changed verLessThan to compatible_verLessThan
kolmanthomas Jul 29, 2025
b2661b9
Ignore these tests for now.
kolmanthomas Jul 29, 2025
6149262
Ignore this test for now, it crashes the interpreter.
kolmanthomas Jul 29, 2025
b8cedd7
Revert "octave: use static methods instead of class-related functions"
kolmanthomas Jul 30, 2025
0538e4e
Workaround for isequal precendence call.
kolmanthomas Aug 2, 2025
6e783dd
Declare fun class as Abstract.
kolmanthomas Aug 3, 2025
7176283
Replaced 'fields' method with the 'fieldnames' method.
kolmanthomas Aug 8, 2025
84a2ed7
Changes to plot.m by changing 'verLessThan' calls to 'compatible_verL…
kolmanthomas Aug 8, 2025
400896f
Renamed filename resetPointValues to clearPointValues in order to mat…
kolmanthomas Aug 8, 2025
58deb3b
Changes to seedRNG.m by changing 'verLessThan' calls to 'compatible_v…
kolmanthomas Aug 8, 2025
2e2695c
Merge pull request #6 from kolmanthomas/octave_dev25
cbm755 Aug 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
14 changes: 12 additions & 2 deletions @chebfun/disp.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ function disp(f)
% See http://www.chebfun.org/ for Chebfun information.

% If the 'format loose' setting is enabled, we print additional linebreaks:
loose = strcmp(get(0, 'FormatSpacing'), 'loose');
if (exist('OCTAVE_VERSION', 'builtin') )
if (compare_versions(OCTAVE_VERSION(), '4.3.0', '>='))
[fmt, spacing] = format();
loose = strcmp(spacing, 'loose');
else
loose = eval('! __compactformat__ ()');
end
else
loose = strcmp(get(0, 'FormatSpacing'), 'loose');
end

s = '';

Expand Down Expand Up @@ -90,8 +99,9 @@ function disp(f)
end

% Print information to screen:
temp = f.domain; % TODO: improve chaining in subsref?
s = [s, sprintf('[%8.2g,%8.2g] %6i %8.2g %8.2g %s\n', ...
f.domain(j), f.domain(j+1), len(j), endvals, extraData{j})];
temp(j), temp(j+1), len(j), endvals, extraData{j})];

end
end
Expand Down
13 changes: 12 additions & 1 deletion @chebfun/display.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ function display(X)
% Copyright 2017 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.

if ( isequal(get(0, 'FormatSpacing'), 'compact') )
if (exist('OCTAVE_VERSION', 'builtin') )
if (compare_versions(OCTAVE_VERSION(), '4.3.0', '>='))
[fmt, spacing] = format();
loose = strcmp(spacing, 'loose');
else
loose = eval('! __compactformat__ ()');
end
else
loose = strcmp(get(0, 'FormatSpacing'), 'loose');
end

if ( ~ loose )
disp([inputname(1), ' =']);
disp(X);
else
Expand Down
16 changes: 8 additions & 8 deletions @chebfun/get.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@
out = hscale(f);
case 'ishappy'
out = ishappy(f);
case fieldnames(f)
out = cell(1, numel(f));
for k = 1:1:numel(f)
out{k} = f(k).(prop);
end
if ( numel(out) == 1 )
out = out{1};
end
case 'lval'
dom = domain(f);
out = feval(f, dom(1));
Expand Down Expand Up @@ -167,6 +159,14 @@ case fieldnames(f)
warning('CHEBFUN:CHEBFUN:get:imps', ...
'''imps'' property is deprecated. Use ''deltas'' instead.');
out = get(f, 'deltas');
case fieldnames(f)
out = cell(1, numel(f));
for k = 1:1:numel(f)
out{k} = f(k).(prop);
end
if ( numel(out) == 1 )
out = out{1};
end
otherwise
error('CHEBFUN:CHEBFUN:get:badProp', ...
'''%s'' is not a recognized CHEBFUN property name.', prop);
Expand Down
16 changes: 8 additions & 8 deletions @chebfun/plot.m
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
%% Plotting starts here:

% Acquire initial color cycle if running R2014b+.
if ( ~verLessThan('matlab', '8.4') )
if ( ~compatible_verLessThan('matlab', '8.4') )
if ( ~holdState )
set(gca, 'ColorOrderIndex', 1);
end
Expand All @@ -318,7 +318,7 @@
hold on

% Get color cycle prior to point plot if running R2014b.
if ( ~verLessThan('matlab', '8.4') )
if ( ~compatible_verLessThan('matlab', '8.4') )
newColorOrder = get(gca, 'ColorOrderIndex');
set(gca, 'ColorOrderIndex', originalColorOrder)
end
Expand All @@ -333,7 +333,7 @@
end

% Reset color cycle prior to jump plot if running R2014b.
if ( ~verLessThan('matlab', '8.4') )
if ( ~compatible_verLessThan('matlab', '8.4') )
set(gca, 'ColorOrderIndex', originalColorOrder);
end

Expand Down Expand Up @@ -366,7 +366,7 @@
end

% Reset colors prior to legend data plot if running R2014b.
if ( ~verLessThan('matlab', '8.4') )
if ( ~compatible_verLessThan('matlab', '8.4') )
set(gca, 'ColorOrderIndex', originalColorOrder);
end

Expand All @@ -387,7 +387,7 @@
end

% Reset colors prior to legend data plot if running R2014b.
if ( ~verLessThan('matlab', '8.4') )
if ( ~compatible_verLessThan('matlab', '8.4') )
set(gca, 'ColorOrderIndex', newColorOrder);
end

Expand Down Expand Up @@ -446,14 +446,14 @@
h = [];

% Get and save the current ColorOrder if running on R2014a or earlier.
if ( verLessThan('matlab', '8.4') )
if ( compatible_verLessThan('matlab', '8.4') )
originalColorOrder = get(gca, 'ColorOrder');
colorOrder = circshift(originalColorOrder, 1);
end

for k = 1:1:numel(deltaData)
% Set color for the next delta function plot.
if ( verLessThan('matlab', '8.4') )
if ( compatible_verLessThan('matlab', '8.4') )
% Manually manipulate the ColorOrder for R2014a or earlier.
colorOrder = circshift(colorOrder, -1);
set(gca, 'ColorOrder', colorOrder);
Expand All @@ -466,7 +466,7 @@
end

% Restore the ColorOrder if running on R2014a or earlier.
if ( verLessThan('matlab', '8.4') )
if ( compatible_verLessThan('matlab', '8.4') )
set(gca, 'ColorOrder', originalColorOrder);
end
end
Expand Down
7 changes: 4 additions & 3 deletions @chebfun/plotData.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
% Get the data from the FUN:
dataNew = plotData(f.funs{k});

if ( ~any(ismember(fields(dataNew), 'xDeltas' )) )
if ( ~any(ismember(fieldnames(dataNew), 'xDeltas' )) )
dataNew.xDeltas = NaN;
dataNew.yDeltas = NaN;
dataNew.yDeltaBase = NaN;
Expand Down Expand Up @@ -103,7 +103,8 @@
% Get the data from the FUN objects:
dataNew = plotData(f.funs{k}, g.funs{k});

if ( ~any(ismember(fields(dataNew), 'xDeltas' )) )
class(dataNew)
if ( ~any(ismember(fieldnames(dataNew), 'xDeltas' )) )
dataNew.xDeltas = [];
dataNew.yDeltas = [];
dataNew.yDeltaBase = [];
Expand Down Expand Up @@ -163,7 +164,7 @@
% Get the data from the FUN objects:
dataNew = plotData(f.funs{k}, g.funs{k}, h.funs{k});

if ( ~any(ismember(fields(dataNew), 'xDeltas' )) )
if ( ~any(ismember(fieldnames(dataNew), 'xDeltas' )) )
dataNew.xDeltas = [];
dataNew.yDeltas = [];
end
Expand Down
7 changes: 7 additions & 0 deletions @chebtech/isequal.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
% Copyright 2017 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.

% OCTAVE: temporary workaround for lack of InferiorClasses support
if ( isa(g, 'singfun') )
out = isequal(g, f);
return
end


out = all(size(f.coeffs) == size(g.coeffs)) ...
&& all(f.coeffs(:) == g.coeffs(:));

Expand Down
10 changes: 0 additions & 10 deletions @domain/cumsum.m

This file was deleted.

10 changes: 0 additions & 10 deletions @domain/diag.m

This file was deleted.

10 changes: 0 additions & 10 deletions @domain/diff.m

This file was deleted.

107 changes: 0 additions & 107 deletions @domain/domain.m

This file was deleted.

10 changes: 0 additions & 10 deletions @domain/eye.m

This file was deleted.

10 changes: 0 additions & 10 deletions @domain/feval.m

This file was deleted.

10 changes: 0 additions & 10 deletions @domain/fred.m

This file was deleted.

Loading
Loading