Skip to main content
1-Visitor
June 19, 2017
Solved

2d interpolation

  • June 19, 2017
  • 4 replies
  • 7221 views

Dear all,

I'm facing an issue with 2d interpolation in Mathcad.

The interpolating function results in negative, not plausible values.

Could you please support you?

Attached you find the file.

Thank-you very much.

Enrico

Best answer by Fred_Kohlhepp

Tried a simple linear interpolation, put the Y scale logarithmic, saw the problem.

Try attached

4 replies

24-Ruby IV
June 19, 2017
ebelmonte1-VisitorAuthor
1-Visitor
June 19, 2017

Hello Valery,

Thank you for answering. However I didn't get where is the problem by the definition of the two-dimensional spline function.

Do you have any Idea?

Thanks!

Enrico

23-Emerald I
June 19, 2017

Tried a simple linear interpolation, put the Y scale logarithmic, saw the problem.

Try attached

ebelmonte1-VisitorAuthor
1-Visitor
July 24, 2017

Thank-you all for your precious support!

1-Visitor
June 19, 2017

I understand your problem.

Among the functions lspline, pspline, cspline,  there is no function by which the value of the first derivative of a function on the boundary could be specified.

To solve your problem it is necessary to add boundary conditions (imaginary conditions).

Look at the small example for a function of one variable.

Я понимаю вашу проблему.

Среди функций lspline, pspline, cspline нет функции, с помощью которой можно было бы задать значение первой производной функции на границе.

Для решения вашей задачи необходимо добавить граничные условия (мнимые условия).

Посмотрите маленький пример для функции одной переменной.

25-Diamond I
June 19, 2017

Splines tend to oscillate, so its no surprise you also get negative values in your interpolation - especially given the wide range of your "Properties" values.

Its interesting to see that Freds interesting tricky way works and gives positive values.

I would stick with a simple 2D linear interpolation.

As Mathcads 2D interpolations restricts me to a square data matrix I had written a few 2D (and 3D) interpolation routines which do not have that restriction. See attached file

Here is the 3D-plot using Freds function

Maybe his function is more appropriate for your purpose - you'll have to decide.

13-Aquamarine
June 20, 2017

Dear Werner, could it be that you have attached an older version of your file? When I open it with MC 15.045 I see this:

As you can see there are some strange issues in both plots.

25-Diamond I
June 20, 2017

No, its saved with MC15 M045.

But 3D-plots are lknown to be problematic depending on OS, video driver, setting of color depth and graphics acceleration.

Not sure why you see those distorted plots.