cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

4-Participant

Interpolation data

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."

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V
(To:mctraila)

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.

4 REPLIES 4
24-Ruby V
(To:mctraila)

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.

4-Participant
(To:Werner_E)
The worksheet start with second page. Values in the vector is ascending.
24-Ruby V
(To:mctraila)

@mctraila wrote:

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

4-Participant
(To:Werner_E)

Thank you

Announcements
Top Tags