Find dead links

When useful sites close, leading to dead links, try:

www.archive.org

where web sites are archived on a regular basis.

You will need the exact web address, there is no text search, but if you have it there is a good chance you will find what you are looking for.

Thanks to the Eng-Tips forum for this tip.

Posted in Computing - general | Tagged , | Leave a comment

Xll add-ins; are they worth the trouble?

As regular readers will know, I occasionally delve into compiling code in C++, or even Fortran, as dlls and link to them with a short piece of VBA to communicate between the spreadsheet and the compiled code.  I have also sometimes had a look at compiling code as an xll file, but found it all too hard, and it hasn’t been obvious to me what the benefits are.  What do others think?  Am I missing something?  What are the benefits of compiling an xll file, compared with a dll?

For future reference (should I decide to have another go at the xll route), two useful looking resources are:

Excel xll Add-in Development

The XLL Add-In Library

Make that three:

Grumpy Old Programmer on XL-DNA

Posted in Excel, Link to dll | Tagged , , , | 8 Comments

AlgLib Spline Functions

Following earlier posts on cubic splines I have collected the Alglib interpolation routines, and the necessary supporting routines, and written interface functions to allow most of the 1Dspline routines to be called from the spreadsheet.  Since there is a large measure of overlap in the supporting routines, I have also included the VBA versions of the basic matrix routines.  The spreadsheet (including full open source code) can be downloaded from AL-Spline-Matrix07.zip (Excel 2007 version) or AL-Spline-Matrix03.zip (pre 2007 versions).

The included functions are; Spline Functions:

  • Cspline1DA: Cubic spline interpolation
  • Akimspline1DA: Akima spline interpolation
  • CRspline1DA: Catmull-Rom spline interpolation
  • Hspline1DA: Hermite spline interpolation
  • Csplinefit1DA: Least squares fit of cubic spline
  • Csplinefitcw1DA: Weighted and constrained least squares fit of cubic spline
  • CSplineint1D: Integration of a cubic spline
  • AkimSplineint1D: Integration of an Akima spline
  • CRSplineint1D: Integration of a Catmull-Rom spline
  • HSplineint1D: Integration of a Hermite spline
  • Csplinediff1D: Differentiation of a cubic spline
  • Akimsplinediff1D: Differentiation of an Akima spline
  • CRsplinediff1D: Differentiation of a Catmull-Rom spline
  • Hsplinediff1D: Differentiation of a Hermite spline

Matrix Functions:

  • RMatInv: Inverse of real matrix
  • CMatInv: Inverse of complex matrix
  • EigenVR: Eigen values and Eigen vectors of a real matrix
  • EigenVS: Eigen values and Eigen vectors of a symmetric matrix

The main differences from the spline functions presented previously are:

  • The Hermite Spline function requires user input first derivative values for each point.
  • The Akima Spline function was not previously included
  • The cubic spline and Catmull-Rom spline functions allow the end segments to be specified as quadratic or cyclic
  • Data may be listed in any order, and is sorted by increasing X value by the function
  • Functions are included to perform least-squares fitting of curves (with or without weighting and or constraints), as well as exact fit.
  • Integration functions are provided for each spline type.

Further details of the interface functions, and the required Alglib modules, will be provided in a later post.

Posted in Excel, Maths, Newton, UDFs, VBA | Tagged , , , , , , , , , , | 6 Comments

P-Y Curve function

The pile lateral load analysis program presented in a previous post used linear elastic spring supports to model the restraint provided by the soil.  Soil stress/strain behaviour is of course highly non-linear, and this post presents an Excel User Defined Function (UDF) that will generate non-linear force-deflection curves (often known as P-Y curves) for a variety of soil types, above or below the water table, and under static or cyclic loading.  This function will be incorporated in the pile analysis program in a future post, together with non-linear behaviour of reinforced concrete piles.

The curves are based on those described in the manual for the COM 624 pile analysis program, which is available for free download from the US FHWA, together with many other valuable documents.  The contents of this manual, together with other aspects of pile design, are summarised in detail in the “Theoretical Manual for Pile Foundations” published by the US ArmyEngineer Research and Development Center.  The linked download site, Vulcanhammer.net, also has a wealth of other documents related to piled foundations available for free download.

A spreadsheet containing the PY624 function and examples, including full open source code, may be downloaded from PY-COM624.zip. Note that the latest version of the LatPile spreadsheet incorporates significant changes to the PY curve function, giving closer results to those in the COM624 Manual.  This may be downloaded from: LatPilePY.zip.

Input and output details are given in the spreadsheet, and are shown in the screenshots below, together with typical output for a variety of soil types.  As always, feedback on the spreadsheet is welcome, using the comment link at the bottom of the post.

PY624 Function input

PY624 Function Output

Soft clay below water table, static load

Soft clay below water table, cyclic load

Stiff clay above water table

Stiff clay below water table, static

Stiff clay below water table, cyclic

Sand below water table, static

Sand below water table, cyclic

Posted in Excel, Geotechnical Engineering, Newton, UDFs, VBA | Tagged , , , , , | 21 Comments

New Links

I have added some new links to Excel Blogs that are regularly updated with new and different content, plus one new maths blog.

Bacon Bits: Delicious pieces of Excel and Access training brought to you by DataPigTechnologies.com

Contextures Blog: The Contextures blog, which is focussed on Excel tips and Excel tutorials, and is published Monday, Wednesday and Friday. There will occasional posts on other topics, including Microsoft Office programs and computer productivity tips.

Excel Hero: The point of the sites is to give you the inspiration and knowledge to become and Excel Hero in your workplace. As a tool, Excel is not used anywhere near its potential by 99.999% of its users.

+plus MagazinePlus magazine opens a door to the world of maths, with all its beauty and applications, by providing articles from the top mathematicians and science writers on topics as diverse as art, medicine, cosmology and sport.

Also a link to John Walkenbach’s blog headlines page, which is a great way to keep up with the latest Excel Blog posts: Excel Blog Headlines

Posted in Excel, Maths | Tagged , , , | Leave a comment