SMath Studio Forum
»
SMath Studio
»
Questions
»
What is the matrix function to find the extrapolated value from a given 2-dimension table
Rank: Member Groups: Registered
Joined: 27/02/2021(UTC) Posts: 16
|
Is there such matrix function to help me get the coefficient Cf based on ratio s/h and B/s from given table in matrix form?
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,125 Was thanked: 506 time(s) in 337 post(s)
|
Originally Posted by: SmathNewbie Is there such matrix function to help me get the coefficient Cf based on ratio s/h and B/s from given table in matrix form?
You can either use linterp() or InterpBilinear(). They can also find an interpolated value between title numbers. Please look at the Reference Book for further information. Regards
|
|
|
|
Rank: Member Groups: Registered
Joined: 27/02/2021(UTC) Posts: 16
|
Originally Posted by: overlord Originally Posted by: SmathNewbie Is there such matrix function to help me get the coefficient Cf based on ratio s/h and B/s from given table in matrix form?
You can either use linterp() or InterpBilinear(). They can also find an interpolated value between title numbers. Please look at the Reference Book for further information. Regards Thank you. Found it here. https://en.smath.com/for..._Interpolate-Matrix.aspxLearn new things every day.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
Originally Posted by: SmathNewbie Is there such matrix function to help me get the coefficient Cf based on ratio s/h and B/s from given table in matrix form? Spline(M,x,y) is universal.Construct 1/1 from the given example, forget decoration <, > Just for interpolation, you don't need the rotation system. Cheers ... Jean Spline Matrix Tutorial RECTANGULAR Surface Plot.sm (23kb) downloaded 22 time(s).
|
1 user thanked Jean Giraud for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
|
1 user thanked Jean Giraud for this useful post.
|
|
|
Rank: Member Groups: Registered
Joined: 27/02/2021(UTC) Posts: 16
|
Originally Posted by: Jean Giraud Originally Posted by: SmathNewbie Is there such matrix function to help me get the coefficient Cf based on ratio s/h and B/s from given table in matrix form? Spline(M,x,y) is universal.Construct 1/1 from the given example, forget decoration <, > Just for interpolation, you don't need the rotation system. Cheers ... Jean Spline Matrix Tutorial RECTANGULAR Surface Plot.sm (23kb) downloaded 22 time(s). Beautiful. I love the way you present all math problems in such a lovely form. Even though it is a very rare case, when x and/or y values exceed the range in my posted table the function will return the value more or less than it should be because I think the table cap the values. I wanted to make changes to the Spline function to reflect this but my limited knowledge in programing and Smath prevents me from doing that. Any suggestions?
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
|
1 user thanked Jean Giraud for this useful post.
|
|
|
Rank: Member Groups: Registered
Joined: 27/02/2021(UTC) Posts: 16
|
Originally Posted by: Jean Giraud Awesome. When x=70, y=0.5, I need it to be 1.75 per code because x>45 but the function gives me 1.83. How would I modify the code for Spline to achieve this.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,980 Was thanked: 1120 time(s) in 718 post(s)
|
Obviously the function uses linear extrapolation beyond the limits of the data array. Without touching the function you can enforce constant extrapolation by repeating the first or last rows or columns of data. surface.sm (19kb) downloaded 10 time(s). |
|
1 user thanked mkraska for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
Originally Posted by: SmathNewbie Awesome. When x=70, y=0.5, I need it to be 1.75 per code because x ... as simple as that, preserving last two cols linearity.
|
1 user thanked Jean Giraud for this useful post.
|
|
|
Rank: Member Groups: Registered
Joined: 27/02/2021(UTC) Posts: 16
|
Me feeling dumb. Thanks, Jean and MKraska
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
What is the matrix function to find the extrapolated value from a given 2-dimension table
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.