知道节点坐标和节点上的温度值,请问matlab中怎样画三维温度场图呢?
1个回答
展开全部
A=[-210.6627 -33391.1192 5.0273
-221.3052 -33387.7415 4.5969
-210.9391 -33393.0068 5.5647
-221.8901 -33390.7396 5.0077
-211.384 -33394.7093 5.6505
-222.6117 -33392.778 5.0554
-212.7074 -33397.5459 5.7381
-225.8973 -33397.5869 5.5587];
xData = A(:,1);
yData = A(:,2);
zData = A(:,3);
minx = min(xData);
maxx = max(xData);
miny = min(yData);
maxy = max(yData);
tx = linspace(minx,maxx)';
ty = linspace(miny,maxy);
[XI,YI] = meshgrid(tx,ty);
ZI = griddata(xData,yData,zData,XI,YI);
mesh(XI,YI,ZI), hold
plot3(xData,yData,zData,'o'), hold off
xlabel( 'x' );
ylabel( 'y' );
zlabel( 'z' );
grid on
view( -53, 50 );
-221.3052 -33387.7415 4.5969
-210.9391 -33393.0068 5.5647
-221.8901 -33390.7396 5.0077
-211.384 -33394.7093 5.6505
-222.6117 -33392.778 5.0554
-212.7074 -33397.5459 5.7381
-225.8973 -33397.5869 5.5587];
xData = A(:,1);
yData = A(:,2);
zData = A(:,3);
minx = min(xData);
maxx = max(xData);
miny = min(yData);
maxy = max(yData);
tx = linspace(minx,maxx)';
ty = linspace(miny,maxy);
[XI,YI] = meshgrid(tx,ty);
ZI = griddata(xData,yData,zData,XI,YI);
mesh(XI,YI,ZI), hold
plot3(xData,yData,zData,'o'), hold off
xlabel( 'x' );
ylabel( 'y' );
zlabel( 'z' );
grid on
view( -53, 50 );
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询