1 Pages (9 items)
Even More Matrix Computations - Messages
#1 Posted: 12/5/2021 9:52:56 AM
Hi,
Back again with another matrix problem, this time on interpolation and bilinear interpolation.
Below is the matrix and relevant values to use (d.t and d.dd) to find the values in sigma.ct matrix

There is a condition that any value in d.dd that is below vy=20 shall use the value in the first row, and not be interpolated below. e.g. d.t = 500 & d.dd = 2.6637 sigma.ct shall be 58.
I have used the linterp2 function to find the values which meet this criteria, which works on its own, but I cant get it to work in a if condition. I have used the interpBilinear function to get the values when d.dd is above vy=20 and this works within the if loop as it gives only the last two rows of the above requirements.
When combined in the for loop the below happens, the linterp2 still gives all the rows, rather than only giving the first 7 (in this case), but gives the correct number of columns.
Is there any way of correcting this? As a thought do I need to put the condition check d.dd<20 within the linterp2 function. if so where would I put it?

Bilinear Interpolation2.sm (24 KiB) downloaded 28 time(s).
Thanks in advance
Ian
Back again with another matrix problem, this time on interpolation and bilinear interpolation.
Below is the matrix and relevant values to use (d.t and d.dd) to find the values in sigma.ct matrix
There is a condition that any value in d.dd that is below vy=20 shall use the value in the first row, and not be interpolated below. e.g. d.t = 500 & d.dd = 2.6637 sigma.ct shall be 58.
I have used the linterp2 function to find the values which meet this criteria, which works on its own, but I cant get it to work in a if condition. I have used the interpBilinear function to get the values when d.dd is above vy=20 and this works within the if loop as it gives only the last two rows of the above requirements.
When combined in the for loop the below happens, the linterp2 still gives all the rows, rather than only giving the first 7 (in this case), but gives the correct number of columns.
Is there any way of correcting this? As a thought do I need to put the condition check d.dd<20 within the linterp2 function. if so where would I put it?
Bilinear Interpolation2.sm (24 KiB) downloaded 28 time(s).
Thanks in advance
Ian
#2 Posted: 12/5/2021 2:23:09 PM
WroteBack again with another matrix problem, this time on interpolation and bilinear interpolation.
Sorry, I don't understand the problem.
Bilinear Interpolation2.sm (24 KiB) downloaded 25 time(s).
#3 Posted: 12/5/2021 4:35:21 PM
WroteWroteBack again with another matrix problem, this time on interpolation and bilinear interpolation.
Sorry, I don't understand the problem.
Bilinear Interpolation2.sm (24 KiB) downloaded 25 time(s).
Hi,
the result should look like:
#4 Posted: 12/5/2021 6:47:57 PM
#5 Posted: 12/5/2021 7:04:41 PM
#6 Posted: 12/6/2021 5:36:14 AM
Once again so close, thanks for the pointer
Below is corrected:
Bilinear Interpolation2 v1.sm (22 KiB) downloaded 21 time(s).
Thanks
Ian
Below is corrected:
Bilinear Interpolation2 v1.sm (22 KiB) downloaded 21 time(s).
Thanks
Ian
#7 Posted: 12/6/2021 8:59:52 AM
You can recast the bilinear in preparation to CreateMesh
Bilinear Interpolation2 v1.sm (43 KiB) downloaded 28 time(s).
Bilinear Interpolation2 v1.sm (43 KiB) downloaded 28 time(s).
#9 Posted: 12/6/2021 12:44:00 PM
WroteYou can recast the bilinear in preparation to CreateMesh
... it didn't attach ???
Bilinear Interpolation2 v1 Next.sm (71 KiB) downloaded 34 time(s).
1 Pages (9 items)
-
New Posts
-
No New Posts