Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi everyone.
I have a little problem with an interpollation data. When i start to use cspline the program give return error "The elements in this vector must be in ascending order."
Mathcad 14.
P.S. Sorry for bad english.
Solved! Go to Solution.
Looks like you posted an empty worksheet !?
When using spline interpolations, the values in the first vector ("x-values") must be in ascending order to make the interpolation work. As you get the error message you describe they obviously aren't all in that order.
Looks like you posted an empty worksheet !?
When using spline interpolations, the values in the first vector ("x-values") must be in ascending order to make the interpolation work. As you get the error message you describe they obviously aren't all in that order.
@mctraila wrote:
The worksheet start with second page.
Tricky 😉
The problem in your sheet is, that you obviously are not aware, that by default the first index number of a vector is 0, not 1.
You created your vectors using a range variable j starting at 1. But the vectors you created that way also have an element with index 0 (by default has the value 0) and as the first value in your vector i is 0, too, the first two elements are both 0 and thats not strictly ascending.
Two possible solutions:
1) Define j as j:=0 .. 11
or
2) Write ORIGIN:=1 at the top of your sheet (alternatively you may set the value of the system variable ORIGIN via the menu -> Tools -> Worksheet Options -> Built-In Variables -> Array Origin(ORIGIN)->1).
For the screenshot below I used option 2
Thank you