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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Inserting table with inputs outputs and interpolation (Mathcad Prime 5)

Ally_mech_eng
3-Newcomer

Inserting table with inputs outputs and interpolation (Mathcad Prime 5)

Newbie to Mathcad here and I'm struggling to find a tutorial for how to insert this table into Mathcad:- 'a' and 'b' are the length and width of a steel plate which will be defined values, but how do I replicate this table to then linear interpolate and give me outputs for both k1 and k2? Am I asking too much of the software? Thanks in advance

Ally_mech_eng_0-1712240851758.png

 

ACCEPTED SOLUTION

Accepted Solutions

I would create three vectors, one for the ratio b/a and one for each of k1 and k2.
The use "linterp" to create functions which give you the interpolated values for k1 and k2 for any given ratio.

You can create a vector either by typing k1:=[.... (Shift Enter after each value) or by inserting a Prime table .

If you still have difficulties, come back and post your Prime worksheet.

Werner_E_0-1712244236316.png

 

Prime 5 worksheet attached

 

 

View solution in original post

3 REPLIES 3

I haven't done any interpolation with Mathcad, but you could set up the formulas for a double interpolation, and then just read the inputs from your table. 

Having been through this, and in your situation - being a newbie (still am) - there are a couple of ways you can do that.  

 

1) If I understand your problem statement, you might have a b/a value that is 1.45, for example.  You would have to interpolate k1 between 0.162 and 0.171, and repeat that for k2.  So you end up with two double interpolations, but the second is just a copy of the first, so you don't have that much work to do.  If  you know how to do this by hand, you can set it up pretty quickly in Mathcad, and just treat b/a, k1, and k2 as vectors.  You can use the indices of the vector from b/a to find the corresponding indices of k1 and k2.  

 

2) Excel component, which you can insert and will give you input and output regions.  You can pass values to the input region, make the interpolation in Excel, and pass the interpolated values back in the output region.  Or, you could look up the values between the k and b/a values that you have and do the double interpolation in Mathcad.  Either way seems like it would work.

 

FieldEng_0-1712241733730.png

 

3) Lastly, and probably easier, but not what you asked, you could use the "interp" or "linterp" functions and just interpolate the given inputs directly in Mathcad.  

 

I haven't created an example of this already, so any of this will take a little bit of tinkering to figure out.  If this is something you'll use for some time to come, I would do the math manually in Mathcad and work up to automating it in a more sophisticated manner.  But that doesn't mean I'm right.  There are a lot of other power users here who might suggest a more elegant approach that I haven't learned yet.  

I would create three vectors, one for the ratio b/a and one for each of k1 and k2.
The use "linterp" to create functions which give you the interpolated values for k1 and k2 for any given ratio.

You can create a vector either by typing k1:=[.... (Shift Enter after each value) or by inserting a Prime table .

If you still have difficulties, come back and post your Prime worksheet.

Werner_E_0-1712244236316.png

 

Prime 5 worksheet attached

 

 

CarlosRomero
14-Alexandrite
(To:Werner_E)

Hello Werner,

I come back with my post “Math programming” https://community.ptc.com/t5/Mathcad/Math-programming/m-p/916565#M209633

Should I publish a new post or continue with the same thread?

CarlosRomero

Announcements

Top Tags