CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   help for data interpolation (http://www.cfd-online.com/Forums/main/81599-help-data-interpolation.html)

cxcxcx0505 November 1, 2010 07:11

help for data interpolation
 
I have data like this.matrix x,y and z.They can be plot to get a 3D surface.But, the data is only 8X7 matrix.I need to interpolate so that these there matrix become 80X70.How can I do the interpolation?Do anyone know?
Thanks!

[matrix X] (8X7)
-2.000000 -0.253290 2.530883 4.408495 6.484675 8.603029 12.000000
-2.000000 -0.198017 2.492032 4.287214 6.286022 8.542624 12.000000
-2.000000 0.055891 2.917745 4.910930 6.760385 9.110679 12.000000
-2.000000 0.440220 3.007800 5.067369 7.184489 9.370805 12.000000
-2.000000 0.649703 3.220592 5.550846 7.136382 9.419947 12.000000
-2.000000 0.766721 2.901661 5.422805 7.490025 9.714287 12.000000
-2.000000 0.400457 2.592794 5.489784 7.235743 9.964797 12.000000
-2.000000 0.396081 2.601213 5.297624 7.349845 9.914467 12.000000

[matrix Y] (8X7)
5.000000 5.000000 5.000000 5.000000 5.000000 5.000000 5.000000
0.586906 1.572462 2.538616 3.316567 2.796196 3.542882 1.551908
0.078708 0.608548 1.065732 1.461480 1.618063 1.354950 0.427768
-0.010383 -0.054167 0.823114 1.225726 1.369016 1.061109 0.239242
0.170133 0.214137 0.785628 0.945448 0.952803 0.750114 0.462212
0.232092 0.366816 0.908057 1.144984 1.088131 1.441083 0.723935
0.368313 0.745600 1.161940 1.393370 1.675171 1.795770 1.007748
5.000000 5.000000 5.000000 5.000000 5.000000 5.000000 5.000000

[matrix Z] (8X7)
-9.000000 -9.000000 -9.000000 -9.000000 -9.000000 -9.000000 -9.000000
-10.935015 -11.084483 -9.977332 -9.563093 -9.508658 -9.492408 -9.727265
-11.472939 -11.769012 -11.404871 -10.792594 -10.297023 -10.676209 -10.705359
-13.393990 -13.516353 -13.449236 -13.169214 -12.843448 -13.128858 -13.073084
-15.330998 -15.373059 -15.417483 -15.363019 -14.924627 -15.198594 -15.017660
-17.271636 -17.272911 -17.276973 -16.968769 -16.716547 -17.123834 -16.837157
-18.582179 -18.647999 -19.032487 -18.946033 -18.573566 -18.389519 -18.275102
-20.000000 -20.000000 -20.000000 -20.000000 -20.000000 -20.000000 -20.000000

valgrinda November 4, 2010 15:20

Bilinear Interpolation
 
Try this:
http://en.wikipedia.org/wiki/Bilinear_interpolation

cxcxcx0505 November 7, 2010 05:08

but,in the data that I showed, z is not a function of x and y.How should I interpolate it then?Do anyone know?
Thanks.

f-w November 10, 2010 18:55

I'm confused as to how each of your matrices are structured, so I can only point you to some Excel tools:
http://www.xlxtrfun.com/XlXtrFun/XlXtrFun.htm


All times are GMT -4. The time now is 16:43.