### Categories

### RSS Feed

### Search NewtonExcelBach

### Archives

### Top Posts

- Commenting a block of code in VBA
- Using Goal Seek on Multiple Cells
- Solving Quadratic, Cubic, Quartic and higher order equations; examples
- Using LINEST for non-linear curve fitting
- Cubic Splines
- The angle between two vectors, Python version
- Drawing in Excel 7 - Creating drawings from coordinates
- Fitting high order polynomials
- Using Linest for non-linear curve fitting, examples, hints and warnings
- Weighted Least Squares Regression, using Excel, VBA, Alglib and Python

### Recent Comments

More Python rotation… on Fitting 3D circles to scattere… Ana Sofía on Indexing NumPy arrays with flo… Soren Hauch on Update to Glob_to_loc3 and Loc… dougaj4 on RCInteract and RC Design Funct… Lorenzo Castellani on RCInteract and RC Design Funct… dougaj4 on Update to Glob_to_loc3 and Loc… Fitting 3D circles t… on Update to Glob_to_loc3 and Loc… Soren Hauch on Update to Glob_to_loc3 and Loc… dougaj4 on Cubic splines with jagged… Bob Jordan on Cubic splines with jagged… dougaj4 on Update to Glob_to_loc3 and Loc… Cubic splines with j… on xlwSciPy 1.09 – update f… Cubic splines with j… on Update to AL-Spline-Matrix Cubic splines with j… on Daily Download 22: Splines and… Soren Hauch on Update to Glob_to_loc3 and Loc…

# Category Archives: Curve fitting

## 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
Leave a comment

## 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
3 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
3 Comments

## xlwSciPy 1.09 – update for xlwings 0.10 and Scipy 0.18.1

The xlwSciPy spreadsheet (last presented here) has been updated for the latest version of xlwings and Scipy. The new spreadsheet can be downloaded from: xlScipy-xlw.zip including full open source code. The spreadsheet requires Python, including xlwings, Numpy, Scipy and Pandas … Continue reading

Posted in Arrays, Curve fitting, Excel, Link to Python, Maths, NumPy and SciPy, Python Pandas, UDFs, VBA
Tagged Automatic re-size array functions, Cubic splines, EvalA function, Excel, Python, SciPy, UDF, VBA, xlwings
2 Comments

## xlwings 0.7.1, dictionaries, and optional arguments

xlwings 0.7.0 was published at the beginning of March, and introduced direct support for Python dictionaries, which I have used to demonstrate various options for dealing with optional arguments in Excel User Defined Functions (UDFs). The latest version, 0.7.1, published … Continue reading

Posted in Curve fitting, Excel, Link to Python, Maths, NumPy and SciPy, UDFs, VBA
Tagged curve_fit, dictionaries, Excel, optional arguments, Python, SciPy, UDF, VBA, xlwings
1 Comment