Can someone explain the behavior of the functions mkpp and ppval?
问题 If I do the following in MATLAB: ppval(mkpp(1:2, [1 0 0 0]),1.5) ans = 0.12500 This should construct a polynomial f(x) = x^3 and evaluate it at x = 1.5 . So why does it give me the result 1.5^3 = .125 ? Now, if I change the domain defined in the first argument to mkpp , I get this: > ppval(mkpp([1 1.5 2], [[1 0 0 0]; [1 0 0 0]]), 1.5) ans = 0 So without changing the function, I change the answer. Awesome. Can anyone explain what's going on here? How does changing the first argument to mkpp