linterp help

linterp help - Messages

#1 Posted: 1/17/2024 10:19:48 AM
GFDIntano

GFDIntano

0 likes in 8 posts.

Group: User

I'm pretty sure it's possible and saw it somewhere here. How do I put this in a single matrix, along with the descriptors like "roof angle, "1", "2E",...etc. and use it for interpolation. Well I can get by using a single column matrix as a work around but I guess I want a more compact looking solution, if that makes sense.

Envelope Procedure, GCpf.PNG
#2 Posted: 1/17/2024 4:00:11 PM
overlord

overlord

554 likes in 1333 posts.

Group: Moderator

Look for InterpBilinear() function.
You can find more info in Reference Book.

Regards

InterpBilinear.sm (8 KiB) downloaded 65 time(s).

2024-01-17_11-07.png
#3 Posted: 1/17/2024 4:03:13 PM
GFDIntano

GFDIntano

0 likes in 8 posts.

Group: User

ohh didn't know about that. big thanks.
#4 Posted: 1/17/2024 6:02:20 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Surface plot is especially coded for your request.
Jean

Interpolate [Linterp, Spline2D] Copy.sm (201 KiB) downloaded 55 time(s).
#5 Posted: 1/17/2024 8:45:37 PM
overlord

overlord

554 likes in 1333 posts.

Group: Moderator

Using linterp() with a function is another way.
Function selects column according to input.

Regards

linterp_select.sm (8 KiB) downloaded 58 time(s).

2024-01-17_15-39.png
#6 Posted: 1/18/2024 10:10:49 AM
GFDIntano

GFDIntano

0 likes in 8 posts.

Group: User

I'm quite satisfied with the InterpBilinear function. I'm exploring Jean's and overlord's additional suggestion but still it was already solved for me. Another question is that would that still work if I had to do interpolation in both the column values and row values such as in case below.

linterp.PNG

From what I understand, InterBilinear() seems incapable of doing what I aim to do. Do you have any suggestions?
#7 Posted: 1/18/2024 6:37:38 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

2024-01-18 11_36_38-Reference book.png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#8 Posted: 1/18/2024 7:10:51 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

From what I understand, InterBilinear() seems incapable of doing what I aim to do. Do you have any suggestions ?


If, I understand your request,
ForLoop algo style will do ... last example page 10.
Jean

Interpolate [Linterp, Spline2D].sm (212 KiB) downloaded 53 time(s).
#9 Posted: 1/18/2024 8:25:30 PM
overlord

overlord

554 likes in 1333 posts.

Group: Moderator

Wrote

From what I understand, InterBilinear() seems incapable of doing what I aim to do. Do you have any suggestions?


On the contrary, InterpBilinear() does exactly what you seek.
It interpolates both row and column values.
PS: I added extra values to accommodate ≤ and ≥ boundaries.

Regards

2024-01-18_15-23.png
#10 Posted: 1/20/2024 4:15:39 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I want a more compact looking solution, if that makes sense.


Visit Samples for bidirectional interpolating Matrix.
Jean

  • New Posts New Posts
  • No New Posts No New Posts