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
Solved! Go to Solution.
Tried a simple linear interpolation, put the Y scale logarithmic, saw the problem.
Try attached
See please the pics 1.1-1.4 here
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
Tried a simple linear interpolation, put the Y scale logarithmic, saw the problem.
Try attached
Thank-you all for your precious support!
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 нет функции, с помощью которой можно было бы задать значение первой производной функции на границе.
Для решения вашей задачи необходимо добавить граничные условия (мнимые условия).
Посмотрите маленький пример для функции одной переменной.
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.
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.
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.
Thank you for your prompt reply. What should be the most likely cause, or is it like searching for the needle in the hay stack?
The usual tipps when one experiences problems with 3D plots are
- turn off the border (which already is in my plots)
- reduce the color depth on your system
- turn off grahics acceleration
- install the newest driver for your video
But the problem usually is that 3Dplots do not show up completetly. Thats not the case here as you see the plots.
No clue what could be the cause. What happens if you create the plots yourself from scratch?
Did you experience problems with 3D plots before?
Reducing color depth from 32 bits to 16 bits gave a massive improvement (plot 2 OK, Plot 1 still a black bar). Recreating the plots from scratch did not change anything. When I change the plot to data points I get correct plots even without reducing color depth. I am afraid I will be forced to experiment a little bit further. Anyway, thank you for your valuable help (as usual). Filip