How to use tri2grid?
3 次查看(过去 30 天)
显示 更早的评论
Hello everybody,
I have a problem with tri2grid. I have a set of coordinate points on a triangle and the value of interest at those points (3 vectors). I would like to create a grid using tri2grid command inside my triangle and see my solution (a matrix) on the grid points. I did the following but I got in my solution matrix (fGrid) NaN values. I read that NaN values occur when your grid points are outside the original mesh but I create the grid on the same triangle of the mesh, do not really understand why I got those NaN values.Anyone can help??
if true
Xt=[zgauss(:,1)];
Yt=[zgauss(:,2)];
tri = delaunay(Xt,Yt);
xGrids = linspace(min(Xt),max(Xt),100);
yGrids = linspace(min(Yt),max(Yt),100);
[Xgrid,Ygrid]=meshgrid(xGrids,yGrids);
fGrid = tri2grid([Xt,Yt]',tri',f_on_gauss,Xgrid,Ygrid);
end
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!