Skip to content
Permalink
Browse files

octave: temporary workaround for f.funs{j}

Either this needs some workaround in subsref or perhaps its an
Octave bug.  I think there are subtle differences about how this
sort of subsref chaining works b/w Octave and Matlab.
  • Loading branch information...
cbm755 committed Jan 20, 2018
1 parent f423d1c commit e20b0ad2dc89cfe8e50ba461b864eff7d5bbef17
Showing with 10 additions and 6 deletions.
  1. +4 −3 @chebfun/disp.m
  2. +2 −1 @chebfun/dispData.m
  3. +2 −1 @chebfun/isempty.m
  4. +2 −1 @chebfun/numColumns.m
@@ -79,9 +79,10 @@ function disp(f)
s = [s, sprintf('\n interval length endpoint values %s\n', extraItem)];
len = zeros(numFuns, 1);
for j = 1:numFuns
len(j) = length(f.funs{j});
ffuns = f.funs;
len(j) = length(ffuns{j});

if ( ~isreal(f.funs{j}) )
if ( ~isreal(ffuns{j}) )
% For complex-valued funs, we don't display the values.

% Print information to screen:
@@ -91,7 +92,7 @@ function disp(f)
else

% Grab values at endpoints:
endvals = [get(f.funs{j}, 'lval'), get(f.funs{j}, 'rval')];
endvals = [get(ffuns{j}, 'lval'), get(ffuns{j}, 'rval')];

% Tweak the endpoint values: (This prevents -0 and +0)
if ( ~any(isnan(endvals)) )
@@ -18,7 +18,8 @@

% Loop over each FUN:
for j = 1:numFuns
infoJ = dispData(f.funs{j});
temp = f.funs;
infoJ = dispData(temp{j});
if ( ~isempty(infoJ) )
numInfo = numel(infoJ);
for k = 1:numInfo
@@ -7,7 +7,8 @@
% See http://www.chebfun.org/ for Chebfun information.

% If there is a .fun and f.funs(1) is not empty the f is not empty.
if ( numel(f) > 1 || ( (numel(f.funs) > 0) && ~isempty(f.funs{1}) ) )
temp = f.funs;
if ( numel(f) > 1 || ( (numel(f.funs) > 0) && ~isempty(temp{1}) ) )
out = false;
else
out = true;
@@ -13,7 +13,8 @@
out = 0;
elseif ( numel(f) == 1 )
% Possible array-valued:
out = size(f.funs{1}, 2);
temp = f.funs;
out = size(temp{1}, 2);
else
% A quasimatrix:
out = numel(f);

0 comments on commit e20b0ad

Please sign in to comment.
You can’t perform that action at this time.