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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

How to find a value on a table and to compute another value with the linear interpolation?

DrilonShabani
8-Gravel

How to find a value on a table and to compute another value with the linear interpolation?

I have a matrix which contains many values for kd, x/d, z/d, Ec1 (reinforced concrete). for a given value of u.sd for example i need to search the matrix for the first higher and lower values than the given one, and with those values , with the linear interpolation to compute the other values in other columns for the corresponding given number.

I had a similar code for C# that my brother wrote for me but since he doesn't know how mathcad works i can't translate into mathcad functions. I will try to explain with a picture:

Screenshot_1.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

This is how it would work using the built-in routine for linear interpolation (you could also chose cubic spline interpolation).

But it fails, because your table includes a lot of equal values in the mu.sd column, e.g.:

What should be the value for k.d (last column), when mu.sd is 0.154? Should it be 2.545, or 2.549 or 2.552 ?

Mathcad can't know and so it fails.

You would either have to provide values with more precision, at least for mu.sd so that all values in that column are different, or you must consolidate lines with equal mu.sd value into one line - maybe chosing the average of all values in the other columns. This could be done using a small Mathcad program.

WE

View solution in original post

2 REPLIES 2

This is how it would work using the built-in routine for linear interpolation (you could also chose cubic spline interpolation).

But it fails, because your table includes a lot of equal values in the mu.sd column, e.g.:

What should be the value for k.d (last column), when mu.sd is 0.154? Should it be 2.545, or 2.549 or 2.552 ?

Mathcad can't know and so it fails.

You would either have to provide values with more precision, at least for mu.sd so that all values in that column are different, or you must consolidate lines with equal mu.sd value into one line - maybe chosing the average of all values in the other columns. This could be done using a small Mathcad program.

WE

Perfect.. It works great now.

Thank you very much

Top Tags