Skip to main content
14-Alexandrite
November 21, 2016
Question

How to find the interpolation function

  • November 21, 2016
  • 2 replies
  • 1708 views

Hello Everyone,

I hope my email finds everyone in good health. Can anyone please help me how to actually find the interpolation function when I use the command "interp". I have attached a file that interpolates frequency based on phase angles and I have plotted the graph. But I would like to what is the equation that I have used here using "interp" and "cspline".

Thank you,

Faisal

2 replies

23-Emerald IV
November 22, 2016

You must first determine what shape of function you expect, and then choose the right fitting function.

I could imagine that in your case a linear fit is the best, that makes it a lot simpler.

You function would be y=a*x+b.

Mathcads functions to find a and b are slope() and intercept() respectively.

Luc

25-Diamond I
November 22, 2016

But I would like to what is the equation that I have used here using "interp" and "cspline".

Using cubic spline interpolation does not give you one function but a series of cubics which join smoothly.

For the theory behind it you may have a look at Spline interpolation - Wikipedia

If you need an analytic expression for one function you would better not use an interpolation but rather a regression, a curve fit.There are numerous ways to do so in Mathcad and you would have to decide at first which type of function to use for the fit.