On Mon, Apr 6, 2009 at 5:12 AM, Tony Richardson <[email protected]> wrote: > I've attached three very simple polynomial functions that I'd like to > contribute to octave-forge. g = polyscale(f,a) is equivalent to > g(x) = f(x*a). g = polytranslate(f,a) is equivalent to g(x) = f(x+a) > and g = polytranscale(f, a, b) is equivalent to g(x) = f((x+a)*b). > > The functions are fairly simple, but I've found them to be extremely > useful. > > Tony Richardson >
I think these would be useful extensions to Octave's polynomial manipulation capabilities. I can assist you with including them, but I have several remarks: 1. You need to add proper copyright header for GPL3. It's easiest to copy it from other Octave's sources. 2. The coding style needs some adjustments to fit Octave's coding styke. In particular, there should be a space between a function name and parens, space after commas separating arguments, 3. I see no need for polytranscale as a simple wrapper. It would make sense if it used a faster code. 4. I don't understand why you use bsxfun. That would make sense only if you left T as a vector. 5. Maybe you could use "pascal" to form the pascal matrix? cheers -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz ------------------------------------------------------------------------------ _______________________________________________ Octave-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/octave-dev
