Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
9c1ade9
octave: use static methods instead of class-related functions
cbm755 Nov 7, 2014
70870e1
octave: compact/loose display support
cbm755 Jan 20, 2018
4dfbd58
octave: TEMPORARY dumb fixes to make Octave work
cbm755 Jan 20, 2018
8ad0fe8
octave: TEMPORARY dumb hack: always return [-1, 1] for domain
cbm755 Jan 20, 2018
2f32248
octave: workaround subsref and property fighting over "domain"
cbm755 Jan 20, 2018
9be5007
octave: workaround for f.domain(j)
cbm755 Jan 20, 2018
de6a7a2
silence warning by reordering switch
cbm755 Jan 20, 2018
c9a5a0c
octave: TEMPORARY: remove the domain class and replace with domain.m
cbm755 Jan 20, 2018
93339e2
octave: temporary workaround for f.funs{j}
cbm755 Jan 20, 2018
b327cdd
octave: add some notes, bugs lists, etc
cbm755 Jan 21, 2018
b4a3644
MWEs for chebfun and tests
Aug 1, 2024
afdb509
add test for 2*x and x*2, the former fails
cbm755 Apr 28, 2025
8c5b9ef
Update octave_notes.txt
kolmanthomas Apr 28, 2025
90fa75f
Workaround for subsref issue with domain
kolmanthomas Jul 15, 2025
a422e5b
Temp fix for 2*chebfun() to work
kolmanthomas May 24, 2025
38843e5
Add method to check if Octave is being used
kolmanthomas Jul 25, 2025
3df27c5
Revert "Temp fix for 2*chebfun() to work"
kolmanthomas Jul 27, 2025
d03f0a5
Revert "Workaround for subsref issue with domain"
kolmanthomas Jul 27, 2025
b414deb
Revert "octave: workaround subsref and property fighting over "domain""
kolmanthomas Jul 27, 2025
3a7cd7c
Added comma delimiter for cell array of anon functions.
kolmanthomas Jul 27, 2025
4a337cf
Revert "octave: TEMPORARY dumb hack: always return [-1, 1] for domain"
kolmanthomas Jul 27, 2025
c32779e
Revert "octave: temporary workaround for f.funs{j}"
kolmanthomas Jul 27, 2025
5b1dffc
Fix unintended behaviour making f a complex-valued chebfun.
kolmanthomas Jul 28, 2025
9f3d4f3
Added a new function to handle 'verLessThan('matlab', version)' calls.
kolmanthomas Jul 29, 2025
ed1a616
Changed verLessThan to compatible_verLessThan
kolmanthomas Jul 29, 2025
c13a428
Ignore these tests for now.
kolmanthomas Jul 29, 2025
3bc3ec7
Ignore this test for now, it crashes the interpreter.
kolmanthomas Jul 29, 2025
9d96372
Revert "octave: use static methods instead of class-related functions"
kolmanthomas Jul 30, 2025
84c2774
Workaround for isequal precendence call.
kolmanthomas Aug 2, 2025
f91b198
Declare fun class as Abstract.
kolmanthomas Aug 3, 2025
2854318
Replaced 'fields' method with the 'fieldnames' method.
kolmanthomas Aug 8, 2025
d6f4705
Changes to plot.m by changing 'verLessThan' calls to 'compatible_verL…
kolmanthomas Aug 8, 2025
4787fa6
Changes to seedRNG.m by changing 'verLessThan' calls to 'compatible_v…
kolmanthomas Aug 8, 2025
a26d979
no longer an xtest
cbm755 Aug 9, 2025
f630957
remove debugging output
cbm755 Aug 9, 2025
f177726
Don't skip tests if NOT on Octave
cbm755 Aug 9, 2025
9f04092
Octave-specific workaround, linked to Issue
cbm755 Aug 10, 2025
968ead3
Use is_octave and no need to support ancient versions
cbm755 Aug 10, 2025
2ff8459
More loose/compact
cbm755 Aug 10, 2025
76e5766
Revert "octave: workaround for f.domain(j)"
cbm755 Aug 11, 2025
dc560af
Add test case for COW uminus bug
cbm755 Aug 14, 2025
b3e6e9b
Add workaround for COW uminus bug
cbm755 Aug 14, 2025
6405c45
octave compatible loose/compact
cbm755 Aug 14, 2025
4edbb1e
Rough script to prepare an Octave package
cbm755 Aug 10, 2025
293231d
CI: build the Octave pkg
cbm755 Aug 13, 2025
874912e
failure is success
cbm755 Aug 13, 2025
6256ce7
Renamed filename resetPointValues to clearPointValues in order to mat…
kolmanthomas Aug 8, 2025
3a1c55d
temporarily remove inferior spec
cbm755 Aug 14, 2025
f566cf8
Revert "Renamed filename resetPointValues to clearPointValues in orde…
cbm755 Aug 24, 2025
fb1318a
Disable tests that crash that Octave interpreter.
kolmanthomas Aug 26, 2025
70a2261
Turned vectorize off by default in chebop.
kolmanthomas Aug 23, 2025
1820952
Revert "octave: TEMPORARY: remove the domain class and replace with d…
kolmanthomas Aug 23, 2025
23a453a
workaround specific to Octave
cbm755 Aug 26, 2025
665811d
Changed octave_notes to use Markdown
kolmanthomas Aug 23, 2025
8304379
Updated octave_notes.md
kolmanthomas Aug 23, 2025
81e3430
CI: keep artifact of package
cbm755 Aug 28, 2025
02fc1ff
CI: already messed up hardcoded, try with wildcard
cbm755 Aug 28, 2025
789aa0f
CI: try different path, back to hardcoded name
cbm755 Aug 28, 2025
23274f4
CI: wildcards
cbm755 Aug 28, 2025
74213ae
TEMPORARILY remove Matlab CI runs
cbm755 Aug 29, 2025
a2b392b
TODO to add a note explaining a change
cbm755 Aug 29, 2025
653bbe3
Fix cp, which was missing lots of files
cbm755 Aug 29, 2025
62db6a8
Update URL in package description
cbm755 Aug 29, 2025
73e09a2
Quick hack to get chebops a little further
cbm755 Sep 7, 2025
414d9f4
Octave also has new-style colorOrderIndex
cbm755 Sep 7, 2025
98c5232
Check for octave in some version-specific tests
cbm755 Sep 7, 2025
02e9a2c
Tweak version checks around broadcasting for Octave
cbm755 Sep 7, 2025
51d2786
More is_octave broadcasting to fix commit
cbm755 Sep 27, 2025
c21715f
octave: TEMPORARY dumb fixes to make Octave work
cbm755 Jan 20, 2018
1ae2481
Added ability to run tests on Octave in CI.
kolmanthomas Oct 17, 2025
c077e5c
Disabled test_trigcasting in tests/chebfun, crashes interpreter
kolmanthomas Oct 18, 2025
9e0d3de
Got rid of some useless comments
kolmanthomas Oct 18, 2025
e87277c
Changed Octave tests workflow to activate on push, pull request and m…
kolmanthomas Oct 19, 2025
e8fc765
Change Octave Docker image
kolmanthomas Nov 30, 2025
3dee8f5
Revert "Add workaround for COW uminus bug"
kolmanthomas Nov 28, 2025
0a5e60b
Revert "Disable tests that crash that Octave interpreter."
kolmanthomas Nov 28, 2025
7afdfcd
Revert "Don't skip tests if NOT on Octave"
kolmanthomas Nov 28, 2025
dc21062
Revert "Disabled test_trigcasting in tests/chebfun, crashes interpreter"
kolmanthomas Nov 28, 2025
a616530
Use is_octave when testing for MATLAB version.
kolmanthomas Dec 1, 2025
d6c4bfa
Added comment indicating where container was built.
kolmanthomas Dec 4, 2025
4d12561
Apply suggestions from code review
cbm755 Dec 4, 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
97 changes: 0 additions & 97 deletions .github/workflows/matlab.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/octave-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Chebfun Tests on Octave

on: [push, pull_request, workflow_dispatch]

jobs:
test-octave:
runs-on: ubuntu-latest
container:
# Container is built from the "classdef" branch of the
# github.com/kolmanthomas/octave repo
image: ghcr.io/kolmanthomas/octave:classdef

steps:
- uses: actions/checkout@v4

- name: Run Chebfun tests
run: octave --eval "addpath(genpath(pwd)); chebtest('--log')"

- name: Upload log file
uses: actions/upload-artifact@v4
with:
name: chebtest-log
path: ./*.log
retention-days: 30

61 changes: 61 additions & 0 deletions .github/workflows/octave_pkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# SPDX-License-Identifier: FSFAP
# Copyright 2025 The Chebfun Developers
# See http://www.chebfun.org/ for Chebfun information.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.

name: Octave packaging

on:
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
octave-pkg:
name: Octave package
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Assemble Octave pkg
run: |
uname -a
pwd
cd octave_pkg
./make_oct_pkg.sh
ls
md5sum chebfun-*.tar.gz
sha256sum chebfun-*.tar.gz

- name: Container setup
run: |
uname -a
docker pull docker.io/gnuoctave/octave:10.2.0
docker run --name=oc --detach --init \
--volume=$PWD:/workdir/chebfun:rw \
gnuoctave/octave:10.2.0 sleep inf
# FIXME: workaround "fatal: unsafe repository" error
# For more details, see https://stackoverflow.com/q/71901632
# and https://github.com/actions/checkout/issues/760
docker exec oc git config --global --add safe.directory /workdir/chebfun
# docker exec oc octave-cli --eval "pkg install struct optim"

- name: Try to install the package (should fail as we need Octave >= 11)
run: docker exec oc octave-cli --eval "cd chebfun/octave_pkg; try, pkg install chebfun-*.tar.gz, exit(1), catch err, disp(err.message), end"

- name: Keep built package as artifact
uses: actions/upload-artifact@v4
with:
name: octave-dev-package
path: octave_pkg/chebfun-*.tar.gz

- name: Stop container
run: |
docker stop oc
docker rm oc
7 changes: 6 additions & 1 deletion @ballfun/disp.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ function disp( f )
% Display one ballfun function
function display_ballfun(f)

loose = strcmp(get(0, 'FormatSpacing'), 'loose');
if is_octave()
[fmt, spacing] = format();
loose = strcmp(spacing, 'loose');
else
loose = strcmp(get(0, 'FormatSpacing'), 'loose');
end

if isempty(f)
fprintf(' empty ballfun\n')
Expand Down
11 changes: 9 additions & 2 deletions @ballfun/display.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ function display(X)
% Copyright 2019 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.

if ( isequal(get(0, 'FormatSpacing'), 'compact') )
if is_octave()
[fmt, spacing] = format();
compact = strcmp(spacing, 'compact');
else
compact = strcmp(get(0, 'FormatSpacing'), 'compact');
end

if ( compact )
disp([inputname(1), ' =']);
disp(X);
else
Expand All @@ -20,4 +27,4 @@ function display(X)
disp(' ');
disp(X);
end
end
end
9 changes: 7 additions & 2 deletions @ballfunv/disp.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ function disp(f)
% Copyright 2019 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.

loose = strcmp(get(0,'FormatSpacing'),'loose');
if is_octave()
[fmt, spacing] = format();
loose = strcmp(spacing, 'loose');
else
loose = strcmp(get(0, 'FormatSpacing'), 'loose');
end

% Compact version:
if ( isempty(f) )
Expand All @@ -22,4 +27,4 @@ function disp(f)
disp(F{j});
end

end
end
10 changes: 8 additions & 2 deletions @ballfunv/display.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ function display(X)
% Copyright 2019 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.

if is_octave()
[fmt, spacing] = format();
compact = strcmp(spacing, 'compact');
else
compact = strcmp(get(0, 'FormatSpacing'), 'compact');
end

if ( isequal(get(0, 'FormatSpacing'), 'compact') )
if ( compact )
disp([inputname(1), ' =']);
disp(X);
else
Expand All @@ -21,4 +27,4 @@ function display(X)
disp(X);
end

end
end
2 changes: 1 addition & 1 deletion @chebfun/conv.m
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
% INTEGRAL is not available in versions of MATLAB prior to R2012a,
% so if we're running on an older version, fall back to QUADGK.
integrand = @(t) feval(f, t).*feval(g, x(k) - t);
if ( verLessThan('matlab', '7.14') )
if ( ~is_octave() && verLessThan('matlab', '7.14') )
out(k) = out(k) + quadgk(integrand, dom(j), dom(j+1), ...
'AbsTol', 1e-15, 'RelTol', 100*eps);
else
Expand Down
9 changes: 5 additions & 4 deletions @chebfun/dimCheck.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
function out = dimCheck(f, g, ~)
%DIMCHECK Check dimension compatibility of two CHEBFUN objects.
% In MATLAB 2016a and below DIMCHECK(F, G) returns:
% The behaviour depends on whether "broadcasting" is suppported.

Check failure on line 3 in @chebfun/dimCheck.m

View workflow job for this annotation

GitHub Actions / codespell

suppported ==> supported

Check failure on line 3 in @chebfun/dimCheck.m

View workflow job for this annotation

GitHub Actions / codespell

suppported ==> supported
% Without broacasting (e.g., MATLAB <= 2016a) DIMCHECK(F, G) returns:

Check failure on line 4 in @chebfun/dimCheck.m

View workflow job for this annotation

GitHub Actions / codespell

broacasting ==> broadcasting

Check failure on line 4 in @chebfun/dimCheck.m

View workflow job for this annotation

GitHub Actions / codespell

broacasting ==> broadcasting
% 1 if numColumns(F) == numColumns(G)
% error otherwise.
%
% In MATLAB 2016b and above DIMCHECK(F, G) returns:
% With brodcasting (e.g., MATLAB >= 2016b) DIMCHECK(F, G) returns:
% 1 if numColumns(F) == numColumns(G)
% -1 if numColumns(F) == 1 or numColumns(G) == 1
% error otherwise.
Expand All @@ -29,8 +30,8 @@
end

% Adjust for MATLAB version if out = -1:
if ( (out == -1 ) && verLessThan('matlab', '9.1') )
out = 0;
if ( (out == -1 ) && ~is_octave() && verLessThan('matlab', '9.1') )
out = 0;
end

if ( out == 0 && nargin == 2 )
Expand Down
7 changes: 6 additions & 1 deletion @chebfun/disp.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ 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 is_octave()
[fmt, spacing] = format();
loose = strcmp(spacing, 'loose');
else
loose = strcmp(get(0, 'FormatSpacing'), 'loose');
end

s = '';

Expand Down
9 changes: 8 additions & 1 deletion @chebfun/display.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ 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 is_octave()
[fmt, spacing] = format();
compact = strcmp(spacing, 'compact');
else
compact = strcmp(get(0, 'FormatSpacing'), 'compact');
end

if ( compact )
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
2 changes: 1 addition & 1 deletion @chebfun/nextpow2.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

% NEXTPOW2 is not vectorized in versions of MATLAB prior to R2010a. Vectorize
% it manually if we're running on older platforms.
if ( verLessThan('matlab', '7.10') )
if ( ~is_octave() && verLessThan('matlab', '7.10') )
mynextpow2 = @nextpow2Vectorized;
else
mynextpow2 = @nextpow2;
Expand Down
Loading