### Categories

### RSS Feed

### Search NewtonExcelBach

### Archives

### Top Posts

- Commenting a block of code in VBA
- Using Goal Seek on Multiple Cells
- Automating chart scale limits
- The angle between two vectors, Python version
- Cubic Splines
- Weighted Least Squares Regression, using Excel, VBA, Alglib and Python
- Using LINEST for non-linear curve fitting
- Microsoft Python Resources
- Solving Quadratic, Cubic, Quartic and higher order equations; examples
- Brent's Method; Update and Examples

### Recent Comments

Brian Dolan on LatPilePY 1.04 dougaj4 on LatPilePY 1.04 Brian Dolan on LatPilePY 1.04 Asymmetric Catenary… on Using Excel Solver from V… Asymmetric Catenary… on A catenary function OliviaHoros on Commenting a block of code in… Column buckling unde… on Using Frame4Buckle with the Al… Column buckling unde… on Buckling of columns with varyi… dougaj4 on Biaxial bending update DonB on Biaxial bending update dougaj4 on Biaxial bending update DonB on Biaxial bending update DonB on Biaxial bending update Perko on Installing Adobe Reader non-DC… Python Traps | Newto… on The meaning of = in Pytho…

# Category Archives: Curve fitting

## Asymmetric Catenary Function

Back in 2009, I posted a user defined function (UDF) to generate a catenary curve, that could be used together with the Excel Solver to generate a curve of a specified span and sag: A catenary function Following a discussion … Continue reading

Posted in Coordinate Geometry, Curve fitting, Excel, Maths, Newton, UDFs, xlwings
Tagged Catenary, Excel, Solver, UDF, VBA
Leave a comment

## More circle fitting options with Scipy

A comment on the first post on this topic found that the method used did not work well for short arcs of large radius circles. An example of the problem can be seen in the screen shots below: The function … Continue reading

Posted in Coordinate Geometry, Curve fitting, Excel, Link to Python, Maths, Newton, NumPy and SciPy, UDFs, VBA, xlwings
Tagged curve fitting, Excel, least squares, Numpy, ODR, Python, SciPy, VBA
Leave a comment

## Cubic splines with jagged data

A cubic spline provides a good approximation to a smooth curve, and alternative versions are available for free download (see Daily Download 22: Splines and Curves, Update to AL-Spline-Matrix, and xlwSciPy 1.09 – update for xlwings 0.10 and Scipy 0.18.1), but if … Continue reading

Posted in Arrays, Beam Bending, Concrete, Curve fitting, Excel, Newton, UDFs, VBA
Tagged CSplineA, Cubic splines, Excel, fitting jagged data, MSplineA, UDF, VBA
2 Comments

## Using Alglib least-squares solvers

Following the last post on using the Python version of Alglib from Excel, via xlwings, this post looks in more detail at alternatives for fitting a non-linear function to a set of data, using the Levenberg-Marquardt method. The spreadsheet with … Continue reading

Posted in AlgLib, Curve fitting, Excel, Link to Python, Maths, Newton, NumPy and SciPy, UDFs, VBA, xlwings
Tagged AlgLib, Excel, Levenberg Marquardt, lsfit, minlm, Numpy, Python, SciPy, UDF, VBA, xlwings
2 Comments

## Excel to Alglib via xlwings

The Alglib library provides many valuable numerical analysis routines, but the VBA version is no longer actively maintained. The latest versions are available in C++, C#, and Python, of which the Python version (in conjunction with xlwings) provides the easiest interface … Continue reading

Posted in AlgLib, Curve fitting, Excel, Link to Python, Maths, Newton, Numerical integration, UDFs, VBA, xlwings
Tagged AlgLib, Cubic Spline functions, curve fitting, Excel, Higher order polynomials, Matrix Functions, Python, UDF, VBA, xlwings
12 Comments

## Plotting Freeze-Thaw Data …

… or other irregular cyclic data. Another Eng-Tips question asked how to approximate ice area over a freeze-thaw cycle using a function based on a sine or cosine curve. The screen-shot below shows three alternatives: Using built in Excel functions requires … Continue reading

Posted in Arrays, Curve fitting, Excel, Maths, Newton, UDFs, VBA
Tagged cyclic data, Excel, Freeze-thaw curve, sigmoid curve, UDF, VBA
1 Comment

## Weighted Least Squares Regression, using Excel, VBA, Alglib and Python

Least squares linear regression in Excel is easy. That’s what the Linest and Trend functions do. That is, they find the coefficients of a straight line (or higher dimension shape) so that the sum of the squares of the distances of … Continue reading

Posted in AlgLib, Curve fitting, Excel, Link to Python, Maths, Newton, NumPy and SciPy, UDFs, VBA
Tagged AlgLib, Linest, Python, SciPy, UDF, VBA, Weighted least squares regression
5 Comments