[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What did I do wrong with this funtion? - Implementing msplines
From: |
Corrado |
Subject: |
Re: What did I do wrong with this funtion? - Implementing msplines |
Date: |
Wed, 16 Sep 2009 11:38:36 +0100 |
User-agent: |
KMail/1.11.4 (Linux/2.6.28-13-generic; KDE/4.2.4; x86_64; ; ) |
Dear Octave list,
I reached a point where the Octave prototype of the mspline function works
really well, and produces the desired output. The final function can be
downloaded from here:
http://scsys.co.uk:8002/33893
And the bibliographic reference is attached to the email in jpeg image format
(mspline_.jpeg).
Now the mspline(i,x,k,t) function returns the correct value when I pass a real
number on as x.
For example:
t=[0,0,0,.3,.5,.6,1,1,1]
mspline(1,.02,3,t)
returns the correct value.
I would now like to optimise it so that if I pass as x a vector of values or a
matrix, the function does transform the vector / matrix (that is all values in
them) in an efficient way. The idea is to create a "for" cycle that spans the
entire vector or matrix, which calls the mspline function and applies it to
each element of the vector or matrix.
Is that a good idea? Any alternative suggestion?
I particular: 1) What language to use for higher performance (Octave, Fortran,
....) 2) How to change the structure of the function so that it is better
performing in Octave.
Please remember I am an Octave newbie, and this is my first attempt at writing
a package. The aim of the package is to provide mspline and ispline based
regressions on large size distance matrices to Octave.
Regards
--
Corrado Topi
Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: address@hidden
mspline_.jpeg
Description: JPEG image