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
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:
Solved! Go to Solution.
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
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