Skip to main content
12-Amethyst
February 6, 2022
Question

Help with "complicated" Interpolation

  • February 6, 2022
  • 3 replies
  • 3665 views

Hello everyone,

 

I need help please to derive the following function:

 

This function shows different curves (0,5 Layer ... 10 Layer).

 

The X- and Y- axis are not linear. I divided both axis into 5 sections. For each curve I have take some data points for each section.

 

I am seeking this final graph:

 

xyz123_0-1644162313877.png

 

 

The datapoints for the different curves are attached.

 

How can I recreate these datapoints as a function, like in the graph shown above?

 

For each section I have to interpolate with spline functions?

Then I do need a "if... if else ... else" command to check which section is active?

 

Attention, the Sheet is Mathcad Prime 6

 

Kind regards

3 replies

25-Diamond I
February 6, 2022

> Attention, the Sheet is Mathcad Prime 6

No, its not! Its in Prime 7 format!

25-Diamond I
February 6, 2022

Here is one first attempt:

Werner_E_1-1644164816111.png

Here the raw data are plotted (just the data points connected by line segments). If you'd like it smoother or if you need functions to calculate intermediate values, you may either try some sort of linear (not smoother) or spline interpolation or even give curve fitting (regressions) a try.

Note the formatting options for Primes native plots are very limited. You may give the built-in third party diagram component a try. It offers more formatting options but has some severe limitations and drawbacks which is the reason I don't/can't use it.

 

Worksheet in Prime 6 (really!) format attached.

 

 

25-Diamond I
February 6, 2022

If you want to use interpolation, you would have to delete the last data line in each section but the last one because the very same data is repeated as first line of the next section and the interpolation functions don't like repeated values in its vector of x-values.

After deleting those rows, you could use linear or spline (lspline, pspline or cspline) interpolation as shown below:

Werner_E_0-1644167744643.png

Worksheet in P6 format attached

 

xyz12312-AmethystAuthor
12-Amethyst
February 6, 2022

Hello Werner,

 

Thank you very much!

 

Just informative for me:

 

In Excel it's possible to create a trendline for each section and to retrieve a possible function (n-th order). With this approach I could use the "genfit" function afterwards. (I saw similar approaches in this forum). What is the difference between genfit and spline or cspline?

16-Pearl
February 7, 2022

Your curves remind me of the Raimondi & Boyd curves used for fluid film bearing Sommerfeld number design.  The authors had 4 curves and an interpolation function.  You'd solve 'y' for each line for a given an 'x' and then interpolate for your known bearing L/D ratio.  I know that doesn't answer your question but someone will find it interesting and a similar approach should work.  I just don't know how they derived their interpolation function.   

2022-02-07_8-04-26.png2022-02-07_8-04-48.png