[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What did I do wrong with this funtion? - Implementing msplines

From: Jaroslav Hajek
Subject: Re: What did I do wrong with this funtion? - Implementing msplines
Date: Wed, 16 Sep 2009 11:45:27 +0200

On Wed, Sep 16, 2009 at 11:33 AM, Corrado <address@hidden> wrote:
> Dear Jaroslav,
> thanks for your help. I prototyped using R originally, and then rewrote it in
> Octave. Two quick questions:
> 1) How can I make the function more efficient?

I can hardly give advices given my little knowledge about your
problem, but it seems to me that M forms a sort of divided-differences
table, which is common with splines. In such case, it is much better
to build the table using loops (this is true for any language) and
vectorize the inner loops (this is for Octave).

> 2) Do you think I should rather write it in Fortran or any other language,
> instead of Octave?

With Fortran or C++ you can often (but not always) achieve a higher
performance, but my common practice is write in Octave first, debug
etc, and possibly recode later if more performance is needed. Octave
is just ideal for that sort of work.

Btw. please DON'T change the subject of the topic arbitrarily, it
confuses mailers.


RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic

reply via email to

[Prev in Thread] Current Thread [Next in Thread]