AlgLib Spline function update

Following a question at the AlgLib Forum I have added the Hermite spline fit function to the AL-Spline-Matrix collection.

The revised spreadsheet, with full open source code is available for download in 2007/20010 version and pre-2007 version.

Typical output of the Hermite spline fit function (together with the two previous spline fitting functions) is shown in the screen shot below:

HSplineFit Function; click for full size view

This entry was posted in Excel, Maths, Newton, UDFs, VBA and tagged , , , . Bookmark the permalink.

5 Responses to AlgLib Spline function update

  1. Mike says:

    Hi Dave, Great site, I visit it regularly. It would be good if I could put you on google reader so that I am kept informed when you have a new post.

    The Hermite fit function looks very useful, however, the spreadsheet that I downloaded has a “ref!” error fspec named range hence the macro is not running. What range should I refer to to get it to work?

    Regards, Mike


  2. dougaj4 says:

    Mike – I’m not sure why your function isn’t working, the rane name fspec isn’t used. I have now deleted it, and also fixed some function names at he bottom of the interpolation sheet which I’d forgotten to update before.

    I can’t get into my web site at the moment, but I’ll upload the new sheet as soon as I can.

    The hermite function should be as shown below, in the spreadsheet as downloaded:


    Enter as an array function (select the output range and press ctrl-shift-enter)

    Please let me know if you are still having problems.

    Doug (not Dave! :))


    • Mike says:

      Doug, Yes I see it now, sorry I was not sure what I was looking for – there was a batch macro that was using filspec obviously that is not required by hsplinefit1da. I will try it out on data that I have got. I think it may be what I am looking for. I use your interpolation function all the time. Best regards, Mike


    • Mike says:

      Hi Doug, Just tried it on a dataset of 2500 points and it worked out perfectly and very fast. Have been looking out for something like this for ages. Need to read up on Hermite Spline best fits. The “M” constant obviously affects the output. I set mine quite high and got the results best for ~18. It must have something to do with the sensitivity.

      Regards, Mike


  3. dougaj4 says:

    Mike – M is the number of separate curves that are fitted to the data. For a widely scattered data set (like in the example in the spreadsheet) a low number is usually best. If you are fitting to a complex shape with low scatter then a high number may well be better.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s