爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 10608|回复: 1

idl中的双线性插值解析

[复制链接]

新浪微博达人勋

发表于 2016-5-6 10:08:57 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
idl中的双线性插值解析[url=]

                               
登录/注册后可看大图
转载[/url]



语法是:Result = BILINEAR(P, IX, JY [, MISSING=value] )
p:是原来没有插值的那个数组,一般应该是两维的,如果是网格的话就相当于x,y两维。
ix和jy都是相对坐标,是我们要插值的这个点相对于原坐标系的一个相对ix,iy。如果我们只差值一个点,则计算相对的坐标带入语法中就可以了。
这是范例:
P = FINDGEN(3,3)
Suppose we wish to find the value of a point half way between the first and second elements of the first row of P. Create the subscript arrays IX and JY:
IX = 0.5 ;Define the X subscript.
JY = 0.0 ;Define the Y subscript.
Z = BILINEAR(P, IX, JY) ;Interpolate.
PRINT, Z ;Print the value at the point IX,JY within P.
IDL prints:
0.500000
Suppose we wish to find the values of a 2 x 2 array of points in P. Create the subscript arrays IX and JY:
IX = [[0.5, 1.9], [1.1, 2.2]] ;Define the X subscripts.
JY = [[0.1, 0.9], [1.2, 1.8]] ;Define the Y subscripts.
Z = BILINEAR(P, IX, JY) ;Interpolate.
PRINT, Z ;Print the array of values.
IDL prints:
0.800000    4.60000
4.70000     7.40000


密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2020-12-31 09:02:53 | 显示全部楼层
好  那就试试么    相对位置就是坐标差呗   那只能做相同格点插值 不能做其他的呗
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表