plotting griddata
이전 댓글 표시
Hey All, I was wondering if there was a way to modify the griddata program to include plotting. Given that I am using data points I know I will have to use meshgrid and was trying to figure out how it would be possible to include into the program. Any ideas? Mel
댓글 수: 3
Walter Roberson
2011년 5월 25일
Why not just call meshgrid() after the griddata() call, as shown in the example in the documentation ?
Matt Fig
2011년 5월 25일
I think you mean MESH, not MESHGRID.
Melissa
2011년 5월 25일
채택된 답변
추가 답변 (1개)
Walter Roberson
2011년 5월 25일
[X,Y] = meshgrid(xi,yi);
Z = griddata(x,y,z,X,Y);
mesh(X,Y,Z), hold
plot3(x,y,z,'o'), hold off
댓글 수: 2
Melissa
2011년 5월 25일
Walter Roberson
2011년 5월 25일
Perhaps we are misunderstanding each other, but there is no reason why the code I show above would not work in a script or function, including a callback function.
At most it might be necessary to be more careful about which axes to plot on to.
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!