How to plot values inside a rectangular cell of a mesh ?

9 次查看(过去 30 天)
d=5;
x1=zeros(1,d)+20;
y1=linspace(4,16,d);
z1=linspace(-1,3,d)';
% Formation of mesh grid for OBJECT
[XX1,YY1]=meshgrid(x1,y1);
Yt1=YY1';
zz1=repmat(z1,1,d);
A1=mesh(XX1,Yt1,zz1);
axis([-10 50 -10 50])
VF=zeros(4,4)+0.0024;
I have created a mesh A1 using the above code.
i have another 4x4 matrix VF.I want to plot the numeric values of VF inside each rectangular cell.
  6 个评论
Matt J
Matt J 2021-12-26
I'd be curious to know what the purpose of this is, and why it is preferable to using a uitable.

请先登录,再进行评论。

采纳的回答

Sivani Pentapati
Sivani Pentapati 2022-1-3
Hi MD,
As mentioned above, In order to display the values of a matrix across a mesh, you can used text function with an offset for each location in the grid to display the values at the center. Please refer to the attached script for a temporary workaround.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by