What is the matrix function to find the extrapolated value from a given 2-dimension table

What is the matrix function to find the extrapolated value from a given 2-dimension table - Messages

#1 Posted: 4/21/2021 4:46:53 PM
Tuan Nguyen

Tuan Nguyen

0 likes in 16 posts.

Group: User

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?

#2 Posted: 4/21/2021 5:38:34 PM
overlord

overlord

552 likes in 1332 posts.

Group: Moderator

Wrote

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
#3 Posted: 4/21/2021 6:05:55 PM
Tuan Nguyen

Tuan Nguyen

0 likes in 16 posts.

Group: User

Wrote

Wrote

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/forum/yaf_postst17672_Interpolate-Matrix.aspx

Learn new things every day.
#4 Posted: 4/21/2021 6:24:29 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

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 (22 KiB) downloaded 49 time(s).

1 users liked this post
Tuan Nguyen 4/21/2021 7:04:00 PM
#5 Posted: 4/21/2021 6:33:04 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... nice example done for Smath Community visitor.
Construct rough data table, spline at will, plot is most delightful.
How do you manage ... Jean

SplineRectangularMatrix Isentropic Surface.sm (457 KiB) downloaded 31 time(s).
1 users liked this post
Tuan Nguyen 4/21/2021 7:04:00 PM
#6 Posted: 4/21/2021 7:13:21 PM
Tuan Nguyen

Tuan Nguyen

0 likes in 16 posts.

Group: User

Wrote

Wrote

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 (22 KiB) downloaded 49 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?
#7 Posted: 4/22/2021 1:50:04 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

See you soon tomorrow ... Jean.


... here is, play with rotation.

Spline Matrix Tutorial RECTANGULAR Surface Plot Example.sm (23 KiB) downloaded 29 time(s).
1 users liked this post
Tuan Nguyen 4/22/2021 2:42:00 PM
#8 Posted: 4/22/2021 2:47:20 PM
Tuan Nguyen

Tuan Nguyen

0 likes in 16 posts.

Group: User

Wrote

Wrote

See you soon tomorrow ... Jean.


... here is, play with rotation.

Spline Matrix Tutorial RECTANGULAR Surface Plot Example.sm (23 KiB) downloaded 29 time(s).



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.

#9 Posted: 4/22/2021 3:37:25 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

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.png
surface.sm (18 KiB) downloaded 25 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Tuan Nguyen 4/22/2021 6:37:00 PM
#10 Posted: 4/22/2021 4:46:35 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

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.

Augment.PNG
1 users liked this post
Tuan Nguyen 4/22/2021 6:37:00 PM
#11 Posted: 4/22/2021 6:41:11 PM
Tuan Nguyen

Tuan Nguyen

0 likes in 16 posts.

Group: User

Me feeling dumb. Thanks, Jean and MKraska
  • New Posts New Posts
  • No New Posts No New Posts