Hello,
Chebfun (http://www2.maths.ox.ac.uk/chebfun/) adds very powerful capabilities to Matlab, making numerical computations feeling like symbolic ones, with the speed of numerical computations. It would be nice if Octave could profit from this major advance. However Chebfun v 3.0 is not working in Octave due to some missing capability in Octave. I am not at all familiar with the internals of Matlab or Octave, but perhaps someone on this list can evaluate if the problem is hard or easy to solve. Making Chebfun working could also suggest where efforts for Octave should go. When I try to define a chebfun on Octave 3.2.4 I get the following :  octave:22> x = chebfun('x',[0 10]); error: concatenation operator not implemented for `scalar' by `class' operations error: called from: error: /home/pf/Trefethen/chebfun/@chebfun/private/ctor_adapt.m at line 119, column 6 error: /home/pf/Trefethen/chebfun/@chebfun/chebfun.m at line 153, column 7 octave:22>  In the file ctor_adapt.m funs is initialized as funs = []; and later updated as funs = [funs fs]; which produces the error message. fs results from a call to a the function fun with the following header:  function [g,ish] = fun(op,ends,varargin) % FUN Constructor % FUN(OP,ENDS) constructs a fun object for the function OP. If OP is a string, % such as '3*x.^2+1', or a function handle, FUN(OP) automatically determines % the number of points for OP. If OP is a vector, FUN(OP) constructs a fun % object such that its function values are the numbers in OP. % % FUN(OP,ENDS,N) where N a positive integer creates a fun for OP with N Chebyshev % points. This option is not adaptive. % % FUN(OP,ENDS,PREF,SCL) creates a fun for OP adaptively using the preferences % provided in the structure PREF (see chbfunpref). Here SCL is a structure % with fields SCL.H (horizontal scale) and SCL.V (vertical scale). % % Additionally, exponents can be pass within PREF by attaching them in a cell % array to PREF.EXPS, and a nonadaptive call can be forced by setting % PREF.N to be a positive integer. % % [G,ISH] = FUN(...) returns the constructed fun G and the boolean ISH, % which is true if the construction is believed to have converged and false % otherwise. % % FUN creates an empty fun. % % See http://www.maths.ox.ac.uk/chebfun for chebfun information. % Copyright 20022009 by The Chebfun Team. % Last commit: $Author: hale $: $Rev: 991 $: % $Date: 20091216 16:06:29 +0000 (Wed, 16 Dec 2009) $:  I repeat it would be nice if Chebfun would work in Octave! Dan 
Daniel Pfenniger wrote:
> Hello, > > Chebfun (http://www2.maths.ox.ac.uk/chebfun/) adds very powerful > capabilities > to Matlab, making numerical computations feeling like symbolic ones, > with the > speed of numerical computations. > It would be nice if Octave could profit from this major advance. > > However Chebfun v 3.0 is not working in Octave due to some missing > capability > in Octave. > > I am not at all familiar with the internals of Matlab or Octave, but > perhaps > someone on this list can evaluate if the problem is hard or easy to > solve. > Making Chebfun working could also suggest where efforts for Octave > should go. > > When I try to define a chebfun on Octave 3.2.4 I get the following : > >  > octave:22> x = chebfun('x',[0 10]); > error: concatenation operator not implemented for `scalar' by `class' > operations > error: called from: > error: /home/pf/Trefethen/chebfun/@chebfun/private/ctor_adapt.m at > line 119, column 6 > error: /home/pf/Trefethen/chebfun/@chebfun/chebfun.m at line 153, > column 7 > octave:22> >  > > In the file ctor_adapt.m funs is initialized as > > funs = []; > > and later updated as > > funs = [funs fs]; > > which produces the error message. fs results from a call to a the > function > fun with the following header: > >  > function [g,ish] = fun(op,ends,varargin) > % FUN Constructor > % FUN(OP,ENDS) constructs a fun object for the function OP. If OP is > a string, > % such as '3*x.^2+1', or a function handle, FUN(OP) automatically > determines > % the number of points for OP. If OP is a vector, FUN(OP) constructs a > fun > % object such that its function values are the numbers in OP. > % > % FUN(OP,ENDS,N) where N a positive integer creates a fun for OP with > N Chebyshev > % points. This option is not adaptive. > % > % FUN(OP,ENDS,PREF,SCL) creates a fun for OP adaptively using the > preferences > % provided in the structure PREF (see chbfunpref). Here SCL is a > structure > % with fields SCL.H (horizontal scale) and SCL.V (vertical scale). > % > % Additionally, exponents can be pass within PREF by attaching them in > a cell > % array to PREF.EXPS, and a nonadaptive call can be forced by setting > % PREF.N to be a positive integer. > % > % [G,ISH] = FUN(...) returns the constructed fun G and the boolean ISH, > % which is true if the construction is believed to have converged and > false > % otherwise. > % > % FUN creates an empty fun. > % > % See http://www.maths.ox.ac.uk/chebfun for chebfun information. > > % Copyright 20022009 by The Chebfun Team. > % Last commit: $Author: hale $: $Rev: 991 $: > % $Date: 20091216 16:06:29 +0000 (Wed, 16 Dec 2009) $: >  > > I repeat it would be nice if Chebfun would work in Octave! > > Dan > Try replacing the initial funs = []; with funs = fun; where fun is the above mentioned function. hth, David 
In reply to this post by Daniel Pfenniger2
On Fri, Jan 22, 2010 at 4:52 PM, Daniel Pfenniger
<[hidden email]> wrote: > Hello, > > Chebfun (http://www2.maths.ox.ac.uk/chebfun/) adds very powerful > capabilities > to Matlab, making numerical computations feeling like symbolic ones, with > the > speed of numerical computations. > It would be nice if Octave could profit from this major advance. > > However Chebfun v 3.0 is not working in Octave due to some missing > capability > in Octave. > > I am not at all familiar with the internals of Matlab or Octave, but perhaps > someone on this list can evaluate if the problem is hard or easy to solve. Indeed few people are familiar with Matlab internals, given they're secret :) > Making Chebfun working could also suggest where efforts for Octave should > go. > > When I try to define a chebfun on Octave 3.2.4 I get the following : > >  > octave:22> x = chebfun('x',[0 10]); > error: concatenation operator not implemented for `scalar' by `class' > operations > error: called from: > error: /home/pf/Trefethen/chebfun/@chebfun/private/ctor_adapt.m at line > 119, column 6 > error: /home/pf/Trefethen/chebfun/@chebfun/chebfun.m at line 153, column 7 > octave:22> >  > > In the file ctor_adapt.m funs is initialized as > > funs = []; > > and later updated as > > funs = [funs fs]; > > which produces the error message. fs results from a call to a the function > fun with the following header: > >  > function [g,ish] = fun(op,ends,varargin) > % FUN Constructor > % FUN(OP,ENDS) constructs a fun object for the function OP. If OP is a > string, > % such as '3*x.^2+1', or a function handle, FUN(OP) automatically determines > % the number of points for OP. If OP is a vector, FUN(OP) constructs a fun > % object such that its function values are the numbers in OP. > % > % FUN(OP,ENDS,N) where N a positive integer creates a fun for OP with N > Chebyshev > % points. This option is not adaptive. > % > % FUN(OP,ENDS,PREF,SCL) creates a fun for OP adaptively using the > preferences > % provided in the structure PREF (see chbfunpref). Here SCL is a structure > % with fields SCL.H (horizontal scale) and SCL.V (vertical scale). > % > % Additionally, exponents can be pass within PREF by attaching them in a > cell > % array to PREF.EXPS, and a nonadaptive call can be forced by setting > % PREF.N to be a positive integer. > % > % [G,ISH] = FUN(...) returns the constructed fun G and the boolean ISH, > % which is true if the construction is believed to have converged and false > % otherwise. > % > % FUN creates an empty fun. > % > % See http://www.maths.ox.ac.uk/chebfun for chebfun information. > > % Copyright 20022009 by The Chebfun Team. > % Last commit: $Author: hale $: $Rev: 991 $: > % $Date: 20091216 16:06:29 +0000 (Wed, 16 Dec 2009) $: >  > > I repeat it would be nice if Chebfun would work in Octave! > > Dan > Let's add it to the long list of things that would be nice, then :) The class support is far from complete. Some things simply don't work at all, in particular inheritance combined with nonscalar classes. This doesn't seem to be used here, so maybe a simple fix is possible, something with concatenation of classes. I agree that chebfun seems quite interesting, but as it apparently is a nonfree software, I'm not much interested in making it work, and I'm not going to install it or use it. So, if you want to go on, I suggest: First try the development version. Only "binary safe" bugfixes are applied to the stable series, so chances are that the development sources can do better. If not, please try to reduce the problem to something simple. It seems something to do with class concatenation. If you can present a bug report that doesn't start with "install chebfun...", then I'll try to find the problem. regards  RNDr. Jaroslav Hajek, PhD computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz 
On 01/22/2010 09:37 PM, Jaroslav Hajek wrote:
The Cebfun license says: Redistribution of this software, with or without modification, is permitted provided that the following conditions are met: * Redistributions must retain the above copyright notice, this list of conditions and the following disclaimer. * Neither the name of Oxford University nor the names of the chebfun authors may be used to endorse or promote products derived from this software without specific prior written permission. * The software is not used commercially without prior written consent. Commercial use shall be defined as any use for which any financial return is received. This includes, but is not limited to, integration of all or part of the software into a product for sale or license by or on behalf of the licensee to third parties. ============================================ Strange. Michael 
On Sat, Jan 23, 2010 at 6:50 AM, Michael D Godfrey
<[hidden email]> wrote: > On 01/22/2010 09:37 PM, Jaroslav Hajek wrote: > > On Fri, Jan 22, 2010 at 4:52 PM, Daniel Pfenniger > <[hidden email]> wrote: > > >> Hello, >> >> Chebfun (http://www2.maths.ox.ac.uk/chebfun/) adds very powerful >> capabilities >> to Matlab, making numerical computations feeling like symbolic ones, with >> the >> speed of numerical computations. >> It would be nice if Octave could profit from this major advance. >> >> However Chebfun v 3.0 is not working in Octave due to some missing >> capability >> in Octave. >> >> I am not at all familiar with the internals of Matlab or Octave, but >> perhaps >> someone on this list can evaluate if the problem is hard or easy to solve. > > > Indeed few people are familiar with Matlab internals, given they're secret > :) > > > >> Making Chebfun working could also suggest where efforts for Octave should >> go. >> >> When I try to define a chebfun on Octave 3.2.4 I get the following : >> >>  >> octave:22> x = chebfun('x',[0 10]); >> error: concatenation operator not implemented for `scalar' by `class' >> operations >> error: called from: >> error: /home/pf/Trefethen/chebfun/@chebfun/private/ctor_adapt.m at line >> 119, column 6 >> error: /home/pf/Trefethen/chebfun/@chebfun/chebfun.m at line 153, column >> 7 >> octave:22> >>  >> >> In the file ctor_adapt.m funs is initialized as >> >> funs = []; >> >> and later updated as >> >> funs = [funs fs]; >> >> which produces the error message. fs results from a call to a the function >> fun with the following header: >> >>  >> function [g,ish] = fun(op,ends,varargin) >> % FUN Constructor >> % FUN(OP,ENDS) constructs a fun object for the function OP. If OP is a >> string, >> % such as '3*x.^2+1', or a function handle, FUN(OP) automatically >> determines >> % the number of points for OP. If OP is a vector, FUN(OP) constructs a fun >> % object such that its function values are the numbers in OP. >> % >> % FUN(OP,ENDS,N) where N a positive integer creates a fun for OP with N >> Chebyshev >> % points. This option is not adaptive. >> % >> % FUN(OP,ENDS,PREF,SCL) creates a fun for OP adaptively using the >> preferences >> % provided in the structure PREF (see chbfunpref). Here SCL is a >> structure >> % with fields SCL.H (horizontal scale) and SCL.V (vertical scale). >> % >> % Additionally, exponents can be pass within PREF by attaching them in a >> cell >> % array to PREF.EXPS, and a nonadaptive call can be forced by setting >> % PREF.N to be a positive integer. >> % >> % [G,ISH] = FUN(...) returns the constructed fun G and the boolean ISH, >> % which is true if the construction is believed to have converged and >> false >> % otherwise. >> % >> % FUN creates an empty fun. >> % >> % See http://www.maths.ox.ac.uk/chebfun for chebfun information. >> >> % Copyright 20022009 by The Chebfun Team. >> % Last commit: $Author: hale $: $Rev: 991 $: >> % $Date: 20091216 16:06:29 +0000 (Wed, 16 Dec 2009) $: >>  >> >> I repeat it would be nice if Chebfun would work in Octave! >> >> Dan >> > > > Let's add it to the long list of things that would be nice, then :) > The class support is far from complete. Some things simply don't work > at all, in particular inheritance combined with nonscalar classes. > This doesn't seem to be used here, so maybe a simple fix is possible, > something with concatenation of classes. > > I agree that chebfun seems quite interesting, but as it apparently is > a nonfree software, I'm not much interested in making it work, and > I'm not going to install it or use it. So, if you want to go on, I > suggest: > > First try the development version. Only "binary safe" bugfixes are > applied to the stable series, so chances are that the development > sources can do better. If not, please try to reduce the problem to > something simple. It seems something to do with class concatenation. > If you can present a bug report that doesn't start with "install > chebfun...", then I'll try to find the problem. > > regards > >  > RNDr. Jaroslav Hajek, PhD > computing expert & GNU Octave developer > Aeronautical Research and Test Institute (VZLU) > Prague, Czech Republic > url: www.highegg.matfyz.cz > > The Cebfun license says: > Redistribution of this software, with or without modification, is permitted > provided that the following conditions are met: > > * Redistributions must retain the above copyright notice, this list of > conditions and the following disclaimer. > > * Neither the name of Oxford University nor the names of the chebfun authors > may be used to endorse or promote products derived from this software > without specific prior written permission. > > * The software is not used commercially without prior written consent. > Commercial use shall be defined as any use for which any financial return is > received. This includes, but is not limited to, integration of all or part > of the software into a product for sale or license by or on behalf of the > licensee to third parties. > ============================================ > Yes, I've read this. The last paragraph makes it a nonfree software.  RNDr. Jaroslav Hajek, PhD computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz 
On 01/22/2010 09:55 PM, Jaroslav Hajek wrote:
Right. But it also does not make sense.The last paragraph makes it a nonfree software. Michael 
On Sat, Jan 23, 2010 at 6:57 AM, Michael D Godfrey
<[hidden email]> wrote: > On 01/22/2010 09:55 PM, Jaroslav Hajek wrote: > > The last paragraph makes it a nonfree software. > > > > > Right. But it also does not make sense. > > Michael > > Why? It makes sense to me.  RNDr. Jaroslav Hajek, PhD computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz 
On 01/22/2010 10:00 PM, Jaroslav Hajek wrote:
In addition, the LICENSE file in the distributioin says:Why? It makes sense to me. CHEBFUN VERSION 3 Copyright (c) 2009 by Lloyd N. Trefethen, Nicholas Hale, Rodrigo B. Platte, Tobin A. Driscoll, and Ricardo Pachon at Oxford University. All rights reserved. ==================================== When I last knew this was not consistent with University policy. 
In reply to this post by Jaroslav Hajek2
On 01/22/2010 10:00 PM, Jaroslav Hajek wrote:
Including the interpretation that says it is OK toWhy? It makes sense to me. incorporate it in Octave (which is not for sale)? I does not explicitly express a limitation on the use of software which incorporates Chebfun. Anyhow, Oxford University would have something to say about this  they provided the resources used to develop the software. 
On Sat, Jan 23, 2010 at 7:15 AM, Michael D Godfrey
<[hidden email]> wrote: > On 01/22/2010 10:00 PM, Jaroslav Hajek wrote: > > Why? It makes sense to me. > > > Including the interpretation that says it is OK to > incorporate it in Octave (which is not for sale)? No, this can't be incorporated into Octave, the license is clearly GPL incompatible. > I does not explicitly express a limitation on the use of > software which incorporates Chebfun. It says that any use involving a financial compensation is only allowed under permission. Apparently that includes me using it at work, because I'm paid for it.  RNDr. Jaroslav Hajek, PhD computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz 
I agree with that. Still it is a silly Copyright statement. I knowNo, this can't be incorporated into Octave, the license is clearly GPL incompatible. the folks at Oxford. Michael 
Administrator

The program looks interesting. I happen to have been working on a BVP this week. Chebfun looks like it would be a good fit for my problem.
If it had a more friendly license I'd give it a try. Ben On Jan 23, 2010, at 11:38 AM, Michael D Godfrey wrote: > On 01/23/2010 12:37 AM, Jaroslav Hajek wrote: >> No, this can't be incorporated into Octave, the license is clearly GPL >> incompatible. >> >> > I agree with that. Still it is a silly Copyright statement. I know > the folks at Oxford. > > Michael > 
Ben Abbott wrote:
> The program looks interesting. I happen to have been working on a BVP this week. Chebfun looks like it would be a good fit for my problem. > > If it had a more friendly license I'd give it a try. > > Ben > > On Jan 23, 2010, at 11:38 AM, Michael D Godfrey wrote: > >> On 01/23/2010 12:37 AM, Jaroslav Hajek wrote: >>> No, this can't be incorporated into Octave, the license is clearly GPL >>> incompatible. >>> >>> >> I agree with that. Still it is a silly Copyright statement. I know >> the folks at Oxford. >> >> Michael >> > For information Chebfun 4.0 has turned to free software (BSD licence). Daniel 
Free forum by Nabble  Edit this page 