我有一些带有x
y
z
插补的 meshgrids 。我想从每个网格网格中获取z
x
和y
。
防爆。我想知道每个meshgrid
x=13
y=0.20
上的z值是多少
[x y z]=meshgrid(x,y,z)
[x1 y1 z1]=meshgrid(x1,y1,z1)
[x2 y2 z2]=meshgrid(x2,y2,z2)
zOfxy=getz(13,0.20)
z1Ofx1y1=getz(13, 0.20)
z2Ofx2y2=getz(13, 0.20)
有没有现成的功能?我知道我可以绘制它并从中获取值,但很难得到z准确的数据
答案 0 :(得分:0)
I don't think there is a built in function to retrieve all associated z values for a given x-y tuple. Since the arrays of X and Y values are sorted, you could use Fibonacci search. Computational complexity should be O(log n * log m)
, where n is the X cardinality and m is the Y cardinality.