Finding the Meshgrid provided a surface.
显示 更早的评论
Hi All, given a surface, is there anyway to find the underlying meshgrid of the surface. For example, I have a surface given by function Z that has been created in the following manner:
x = -4:0.4:4; y = -8:0.4:8; [X,Y] = meshgrid(x,y);
Z = comp_z(X,Y);
%Given just the surface, Z , is there a way to find the meshgrid that created it?
1 个评论
"Given just the surface, Z , is there a way to find the meshgrid that created it?"
In general this is not possible. Consider a simple 2D example: if I give you:
Y = [0,-0.70711,-1,-0.70711,0,0.70711,1,0.70711,0]
can you tell me which X values I used the generate those Y values?:
Y = sin(X)
Unless you have other information (e.g. about the shape of the curve, sample spacing, a range, a domain and some other restrictions, etc) then the general answer is this is not possible.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!