On 8 October 2011 13:56, Fernando <fdnieuwve...@gmail.com> wrote: > Hi there > > Just want to post a simple Taylor expansion code based on Cauchy's integral > formula taking > the contour to be a circle: > > function coeff = taylor(N,r,f) > > h = 2*pi/N; > > n = 0:N-1; # index of coefficients > th = n*h; # step length around a circle > > coeff = real(1./(N*(r.^n)).*fft(f(r*exp(i*th)))); > > octave:4> taylor(16,0.5,@(x) 1./(1-x)) > ans = > > Columns 1 through 8: > > 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 > > Columns 9 through 16: > > 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 > > > The problem is choosing the radius of your circle, to my knowledge theres no > optimal radius r. > Also you need to choose r such that the function f is analytic in that > region, in the example I chose r < 1 > as there is a pole at 1. > > Just thought I share it since its so simple. Hope its useful. > > Cheers > Fernando
Hi Fernando, have you consider submitting to octave-forge? http://octave.sourceforge.net/ Octave-forge is an octave sister project that maintains several packages for octave. I'm CC'ing this e-mail to octave-forge mailing list too. We could include your function (and hopefully more in the future) in there? Could you maybe suggest a package for it? Carnë ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev