Hi, Seems I never communicated about the API included in this plugin. I thought I did, but I am unable to find any trace in the mail archives :-( As I'll have more available time starting from now and that most of the things I'm writing for goffice/gnumeric are waiting for goffice branching, I might come back to this plugin these days.
Currently the plugin contains two sheet functions: interpolation and periodogram. Follows a short description of what they provide and how things work. interpolation(abscissas,ordinates,targets[,interpolation]) - abscissas: the known x values - ordinates: the known y values - targets: the x values for which we want the interpolated values - interpolation: the wanted interpolation type 0: linear 1: linear with averaging 2: staircase 3: staircase with averaging 4: natural cubic spline 5: natural cubic spline with averaging Default interpolation type is linear. The interpolated values are returned as a one column matrix. Instead of using numerical values for the interpolation type, I would have preferred to use more descriptive strings, but it appeared that it would end with serious localization issues, so I kept these numerical constants, even if they are not so easy to use. periodogram(ordinates,[filter,[abscissas,[interpolation,[number]]]]) This functions does an fft, after applying a filter function. It uses only real values both as data and returned data (also a one column matrix). - ordinates: the y values to transform - filter: the optional filter type; currently implemented: 0: no filter (rectangular window) 1: Bartlett (triangular window) 2: Hahn (cosine window) 3: Welch (parabolic window) with the same concern as for the interpolation method; - abscissas: optional x values, mostly useful when the data are not regularly spaced - interpolation: the interpolation method to use to get y values corresponding to regularly spaced x values; the value has the same meaning than in the interpolation function; - number: the number to use for the interpolation, by default the power of 2 just over the data number. The original code has been written by Franck Laurency, and had more functions (the two above were split in various functions were the names of the filter or the interpolation method was explicit with the drawback of a lot of duplicated code). The extra function I need to add are convolution and various filters (based on convolution methods). Everything was also originally implemented as tools. Now, I'd like to have comments on the already implemented things (should I add linear_interpolation (or lininterp or whatever) and other easier to use functions) and on the new functions : which arguments are needed? do we need an optional interpolation of the entered data? And last, should everything be also implemented as tools? Cheers, Jean _______________________________________________ gnumeric-list mailing list gnumeric-list@gnome.org http://mail.gnome.org/mailman/listinfo/gnumeric-list