Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline SmathNewbie  
#1 Posted : 21 April 2021 22:46:53(UTC)
SmathNewbie


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?

Offline overlord  
#2 Posted : 21 April 2021 23:38:34(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 282
Turkey

Was thanked: 80 time(s) in 59 post(s)
Originally Posted by: SmathNewbie Go to Quoted Post
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
Offline SmathNewbie  
#3 Posted : 22 April 2021 00:05:55(UTC)
SmathNewbie


Rank: Member

Groups: Registered
Joined: 27/02/2021(UTC)
Posts: 16

Originally Posted by: overlord Go to Quoted Post
Originally Posted by: SmathNewbie Go to Quoted Post
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.aspx

Learn new things every day.
Online Jean Giraud  
#4 Posted : 22 April 2021 00:24:29(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 5,320
Canada

Was thanked: 842 time(s) in 672 post(s)
Originally Posted by: SmathNewbie Go to Quoted Post
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 16 time(s).

thanks 1 user thanked Jean Giraud for this useful post.
on 22/04/2021(UTC)
Online Jean Giraud  
#5 Posted : 22 April 2021 00:33:04(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 5,320
Canada

Was thanked: 842 time(s) in 672 post(s)
... 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 (458kb) downloaded 10 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 22/04/2021(UTC)
Offline SmathNewbie  
#6 Posted : 22 April 2021 01:13:21(UTC)
SmathNewbie


Rank: Member

Groups: Registered
Joined: 27/02/2021(UTC)
Posts: 16

Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: SmathNewbie Go to Quoted Post
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 16 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?
Online Jean Giraud  
#7 Posted : 22 April 2021 19:50:04(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 5,320
Canada

Was thanked: 842 time(s) in 672 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
See you soon tomorrow ... Jean.

... here is, play with rotation.

Spline Matrix Tutorial RECTANGULAR Surface Plot Example.sm (24kb) downloaded 8 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 22/04/2021(UTC)
Offline SmathNewbie  
#8 Posted : 22 April 2021 20:47:20(UTC)
SmathNewbie


Rank: Member

Groups: Registered
Joined: 27/02/2021(UTC)
Posts: 16

Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: Jean Giraud Go to Quoted Post
See you soon tomorrow ... Jean.

... here is, play with rotation.

Spline Matrix Tutorial RECTANGULAR Surface Plot Example.sm (24kb) downloaded 8 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.

Offline mkraska  
#9 Posted : 22 April 2021 21:37:25(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,668
Germany

Was thanked: 919 time(s) in 578 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.png
surface.sm (19kb) downloaded 8 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 23/04/2021(UTC)
Online Jean Giraud  
#10 Posted : 22 April 2021 22:46:35(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 5,320
Canada

Was thanked: 842 time(s) in 672 post(s)
Originally Posted by: SmathNewbie Go to Quoted Post
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
thanks 1 user thanked Jean Giraud for this useful post.
on 23/04/2021(UTC)
Offline SmathNewbie  
#11 Posted : 23 April 2021 00:41:11(UTC)
SmathNewbie


Rank: Member

Groups: Registered
Joined: 27/02/2021(UTC)
Posts: 16

Me feeling dumb. Thanks, Jean and MKraska
Users browsing this topic
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.