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
Hi guys,
I am attempting to automate finding the correct row with 3 inputs as shown attached in a spreadsheet using Mathcad prime 10. I have also attached the data in a Mathcad 10 prime file. There are some challenges with this, First, each column has multiple of the same values, so the normal linterp function cannot be used. I suppose a better option would be a combination of lookup and linterp.
Any suggestions on how to best solve this?
Cheers.
Solved! Go to Solution.
Here is my attempt using my linterp_3D function.
I tried to keep it more general with respect to the number of values in the input data and the matrix dimensions of the output so its easier to adopt it from the dummy data to your real data.
I also noticed that the data in the excel sheet is different from the data you have in the Prime sheet.
EDIT: OK, the differences are just +/- 0.0005.
Please check and double check the results my function returns very thoroughly for plausibility!!
Thats demanding.
I once wrote simple functions which would do 2D and 3D linear interpolations.
In case of the 3D interpolation, the data had to be provided via a nested vector, consisting of matrices because Prime does not allow 3- ore ,more dimensional arrays.
This function returns just ONE single value for three inputs a, b and c.
So in your case you would have to set up 35 data vectors "Data" and use the function 35 times to get the 5x7 result matrix you need.
Creating the necessary data matrices might need some programming and maybe it would be easier to write a program which uses the data structure as provided by the Excel sheet and loop through the three input vectors to find the most suitable values.
Anyway, I attach the 3D interpolation file if you want to give it a try.
Do you have also for 2D interpolation prime 9 sheet or function to show?
@Cornel wrote:
Do you have also for 2D interpolation prime 9 sheet or function to show?
Was posted here in the forum quite often (mostly for real Mathcad 15, but also converted to Prime.
See attached
Here is my attempt using my linterp_3D function.
I tried to keep it more general with respect to the number of values in the input data and the matrix dimensions of the output so its easier to adopt it from the dummy data to your real data.
I also noticed that the data in the excel sheet is different from the data you have in the Prime sheet.
EDIT: OK, the differences are just +/- 0.0005.
Please check and double check the results my function returns very thoroughly for plausibility!!
Impressive! Thanks a lot.