Why I can not plot 1-t and 2-d plot? - I have 3-d plot! - Сообщения
linterp-xyplot-using-defined-argument.sm (21 КиБ) скачан 39 раз(а).
interp(), ... functions from Mathcad Toolbox still have a bug. The implementation used does incorrect interpolation on some intervals. I don't know how to fix this yet, because the algorithm was restored according to the article and perhaps it was done incorrectly.
And what is it?
See the 3-d plot in attach without this bug!linterp.sm (21 КиБ) скачан 28 раз(а).
Эта проблема также ведёт к неправильной интерполяции в решателях ОДУ, которые кроме табличного решения предлагают и интерполированные функции. Там используется интерполятор из Mathcad Toolbox.
После реализации этих функций я делал только примитивные тесты и ошибка не была вовремя обнаружена.
WroteЭто и есть баг в численном алгоритме. К сожалению, требуется основательная переработка алгоритма для выяснения причины такого поведения. Я не силён в кубических сплайнах, в их реализации.
Эта проблема также ведёт к неправильной интерполяции в решателях ОДУ, которые кроме табличного решения предлагают и интерполированные функции. Там используется интерполятор из Mathcad Toolbox.
После реализации этих функций я делал только примитивные тесты и ошибка не была вовремя обнаружена.
Это не просто баг. Это, как говаривал ваш катькин Ельцин, какая-то загогулина!
WroteЭто и есть баг в численном алгоритме. К сожалению, требуется основательная переработка алгоритма для выяснения причины такого поведения. Я не силён в кубических сплайнах, в их реализации.
Эта проблема также ведёт к неправильной интерполяции в решателях ОДУ, которые кроме табличного решения предлагают и интерполированные функции. Там используется интерполятор из Mathcad Toolbox.
После реализации этих функций я делал только примитивные тесты и ошибка не была вовремя обнаружена.
Is that bug only related to non-equidistant points? In that case, the functions would still be good enough for the ode solvers, at least for rkfixed()
WroteIs that bug only related to non-equidistant points ?
The lspline(X,Y) produces the wrong vector
k ... [0 3 0 0 0.6629 ...suite OK]
k ... [0 0.6629 ...suite OK]
Put the right vector in interp(k,X,Y,x) fails.
Simply a bug ... reflexive double bug.
My Smath Solver 30405 document is fine,
Interpolate, 1rst Derivative, 2nd Derivative, Integrate.
Jean.
Maple spline function.sm (23 КиБ) скачан 27 раз(а).
Best regards.
Alvaro.
WroteIt seems that the Mathcad lspline actually it is a cubic spline.
I will remind you of this document, which describes how the functions work. My implementation of interpolation has an error, but the coefficients themselves seem to be calculated correctly.
In Mathcad the first three numbers encode the type of spline. Jean doesn't know about this.
Cubic spline interpolation using Mathcad (2009).pdf (256 КиБ) скачан 82 раз(а).
WroteWroteIt seems that the Mathcad lspline actually it is a cubic spline.
I will remind you of this document, which describes how the functions work.
Cubic spline interpolation using Mathcad (2009).pdf (256 КиБ) скачан 82 раз(а).
Yes, my comment is about that the lspline and pspline names could be sort of confusing, because, as the report says, mathcad's lspline, pspline and cspline are all "cubic splines". The "l" in "lspline" is not for linear interpolation, but for linear ends conditions, also called natural conditions. The "p" is for parabolic, and the "c" for cubic, all meaning ends conditions too.
Thus, Mathcad lspline is not related with SMath linterp or maple spline(X,Y,x,linear)
WroteIn Mathcad the first three numbers encode the type of spline. Jean doesn't know about this.
As usual. Yes, I know. You can also find here an adaptive spline interpolation using that encoding.
Best regards.
Alvaro.
WroteYes, my comment is about that the lspline and pspline names could be sort of confusing, because, as the report says, mathcad's lspline, pspline and cspline are all "cubic splines". The "l" in "lspline" is not for linear interpolation, but for linear ends conditions, also called natural conditions. The "p" is for parabolic, and the "c" for cubic, all meaning ends conditions too.
Well tutored Alvaro.
Easy to explore more from late Samples.
l & p have most remarkable effect in the start region.
Under the hood, l_spline is the interpolator ODEsolve.
WroteMy implementation of interpolation has an error,
Use the Smath code ... visit late Samples.
As an independent Smath document, can be traced
to doctor your original error.
Simply implement the Mathsoft interpolation code.
WroteIn Mathcad the first three numbers encode the type of spline. Jean doesn't know about this
I myself don't know a lot of things.
Yet I don't post useless messages just to reply.
I guess most people don't, except Jean.
More unacceptable part is, sometimes he posts false information.
Especially on engineering questions/samples.
And insist on that wrong claims like his life depends on it.
I am afraid he will cause something catastrophic in real life.
-
Новые сообщения
-
Нет новых сообщений