
From:  Nicholas Jankowski 
Subject:  Re: Taylor expansion does not expand well 
Date:  Thu, 10 Dec 2015 15:42:43 0500 
Just to compare this to current MATLAB behavior, if you try and callOn Thu, Dec 10, 2015 at 12:36 PM, Nicholas Jankowski
<address@hidden> wrote:
> On Thu, Dec 10, 2015 at 12:05 PM, Andy Buckle <address@hidden> wrote:
>>
>>
>>
>> On 10 December 2015 at 16:56, Jonathan Camilleri <address@hidden>
>> wrote:
>>>
>>> How does this work please?
>>>
>>> f=[1,3,3]
>>> f =
>>>
>>> 1 3 3
>>>
>>> octave:2> g = taylor(1,'expansionPoint',1,'order',4)
>>>
>>> Error:
>>> error: 'taylor' undefined near line 1 column 5
>>>
>>> What does this error mean please?
>>>
>>>
>>> I am using http://octaveonline.net/.
>>>
>>> See post at
>>> http://math.stackexchange.com/questions/209320/wheredothefactorialscomefrominthetaylorseries.
>>> See https://en.wikipedia.org/wiki/Taylor_series.
>>> Documentation at
>>> http://octave.sourceforge.net/symbolic/function/@sym/taylor.html would be
>>> helpful if it included more clear examples, preferably ones which are
>>> complete.
>>>
>>> You may use data sets to include tutorials if you wish, as I fail to see
>>> a complete implementation in place.
>>>
>>
>> "'taylor' undefined" means it can't find the function, taylor. Do you have
>> the symbolic package installed and loaded?
>>
>> If you do
>>
>> pkg list
>>
>> do you see a star next to symbolic?
>>
>>
>>
>> 
>> /* andy buckle */
>>
>> _______________________________________________
>> Helpoctave mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/helpoctave
>>
>
> I just checked out octaveonline.net, and symbolic 2.1.0 should be installed
> and loaded by default. (list below). I'm running a newer version (2,2,2).
> Jon, it is part of the symbolic package, and for it to work you have to call
> it with symbolically declared variables. (try: help sym)
>
> Depending on how I try to call taylor, I get the same response. I'm not sure
> what the expected behavior is:
>
>>> a = sym('a')
> a = (sym) a
>
> taylor(a)
> a = (sym) a
>
>>> taylor(sin(a))
> ans = (sym)
>
> 5 3
> a a
>    + a
> 120 6
>
> Alll good.
>
> now, calling with a nonsymbolically defined argument:
>
>>> b = [1:10];
>>> taylor(sin(b))
> error: 'taylor' undefined near line 1 column 1
>
> Seems like it should give a better answer than that, as this seems like it
> can't find taylor, when it's just called incorrectly. does that have
> something to do with how the interpreter looks for the package function?
>
> What's more, trying the same on octaveonline.net:
>
> octave:10> a=sym ('a')
> a = (sym) a
>
> octave:11> taylor(a)
> error: structure has no member '
> '
> error: called from:
> error: /usr/local/share/octave/packages/symbolic2.1.0/@sym/symvar.m at
> line 98, column 14
> error: /usr/local/share/octave/packages/symbolic2.1.0/@sym/taylor.m at
> line 46, column 7
>
>
> Is this just a 2.1.0 bug?
>
> octave:2> pkg list
>
> Package Name  Version  Installation directory
> ++
> communications * 1.2.0 
> .../share/octave/packages/communications1.2.0
> control * 2.6.6 
> /usr/local/share/octave/packages/control2.6.6
> econometrics * 1.1.1 
> .../share/octave/packages/econometrics1.1.1
> financial * 0.4.0 
> .../local/share/octave/packages/financial0.4.0
> fuzzylogictoolkit * 0.4.4 
> .../octave/packages/fuzzylogictoolkit0.4.4
> general * 1.3.4 
> /usr/local/share/octave/packages/general1.3.4
> geometry * 1.7.0 
> /usr/local/share/octave/packages/geometry1.7.0
> io * 2.2.7  /usr/local/share/octave/packages/io2.2.7
> linearalgebra * 2.2.1 
> .../share/octave/packages/linearalgebra2.2.1
> mechanics * 1.3.1 
> .../local/share/octave/packages/mechanics1.3.1
> miscellaneous * 1.2.1 
> .../share/octave/packages/miscellaneous1.2.1
> nan  2.7.1  /usr/local/share/octave/packages/nan2.7.1
> odepkg * 0.8.4 
> /usr/local/share/octave/packages/odepkg0.8.4
> optim * 1.4.1 
> /usr/local/share/octave/packages/optim1.4.1
> optiminterp * 0.3.4  .../share/octave/packages/optiminterp0.3.4
> parallel * 2.2.0 
> /usr/local/share/octave/packages/parallel2.2.0
> signal * 1.3.0 
> /usr/local/share/octave/packages/signal1.3.0
> splines * 1.2.7 
> /usr/local/share/octave/packages/splines1.2.7
> statistics * 1.2.4  .../share/octave/packages/statistics1.2.4
> strings * 1.1.0 
> /usr/local/share/octave/packages/strings1.1.0
> struct * 1.0.10 
> /usr/local/share/octave/packages/struct1.0.10
> symbolic * 2.1.0 
> /usr/local/share/octave/packages/symbolic2.1.0
>
>
>
>
>
> _______________________________________________
> Helpoctave mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/helpoctave
>
taylor with a matrix of doubles, you get the following error message:
> Undefined function 'taylor' for input arguments of type 'double'.
So, I guess its slightly better error message, since you might be able
to deduce from there that you're calling it incorrectly.
[Prev in Thread]  Current Thread  [Next in Thread] 