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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

11-Garnet

## Range return value

Hi guys Im getting this error below when looking at range of values in a table and trying to match the relevant density.

Sheet is attached, thanks guys

🙂

ACCEPTED SOLUTION

Accepted Solutions
23-Emerald III
(To:BG_9641770)

The error message is clear: linterp requires that the first argument is a vector with values in ascending order. Your vector Lv2 has values 1, 2, 4, 7, 0 and 0.

The first four values are ascending (every next value is higher than the previous), but the fifth and sixth are 0, that is less than 7.

Considering you have empty or zero values in that part of the table that you draw Lv2 from, I suggest you cut the bottom two lines (for layers 5 and 6) from the table. Then it should work.

Note that the result of the function is not 18, but 17.41 kg/m^3, because, contrary to its name, linterp also extrapolates linearly.

Success!
Luc

2 REPLIES 2
23-Emerald III
(To:BG_9641770)

The error message is clear: linterp requires that the first argument is a vector with values in ascending order. Your vector Lv2 has values 1, 2, 4, 7, 0 and 0.

The first four values are ascending (every next value is higher than the previous), but the fifth and sixth are 0, that is less than 7.

Considering you have empty or zero values in that part of the table that you draw Lv2 from, I suggest you cut the bottom two lines (for layers 5 and 6) from the table. Then it should work.

Note that the result of the function is not 18, but 17.41 kg/m^3, because, contrary to its name, linterp also extrapolates linearly.

Success!
Luc

11-Garnet
(To:LucMeekes)

Thanks Luc thats spot on, yes changed the values in the table and it returned 17.41 kg/m^3.

Yes correct Luc, i have swapped the Interp out to get

Announcements

Top Tags