在3D图形中添加点

时间:2014-02-05 03:56:02

标签: matlab 3d plot point

我有如下所示的数据,并且不知道为什么点(25,25,0)没有绘制到图表中。

X = [0,71,142,213,284,355,426;0,71,142,213,284,355,426;0,71,142,213,284,355,426;0,71,142,213,284,355,426;0,71,142,213,284,355,426;0,71,142,213,284,355,426];

Y = [0,0,0,0,0,0,0;71,71,71,71,71,71,71;142,142,142,142,142,142,142;213,213,213,213,213,213,213;284,284,284,284,284,284,284;355,355,355,355,355,355,355];

IntensityError =

   1.0e-04 *

    0.4609    0.0000    0.0000    0.0000    0.0000    0.0000    0.4609
    0.9217    0.0000    0.0000    0.0000    0.0000    0.0000    0.9217
         0    0.0000    0.0000    0.0000    0.0000    0.0000         0
    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000
    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000
    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000

mesh(X,Y,Error)
hold on plot3(25,25,0,'*')

运行上面的代码时,您会看到未绘制点(25,25,0)。 我试图解决这个问题很多天了。请帮帮我。

1 个答案:

答案 0 :(得分:1)

不确定你的意思,但是我的快速测试中的数字显示了这一点:

X = [0,71,142,213,284,355,426;
    0,71,142,213,284,355,426;
    0,71,142,213,284,355,426;
    0,71,142,213,284,355,426;
    0,71,142,213,284,355,426;
    0,71,142,213,284,355,426];

Y = [0,0,0,0,0,0,0;
    71,71,71,71,71,71,71;
    142,142,142,142,142,142,142;
    213,213,213,213,213,213,213;
    284,284,284,284,284,284,284;
    355,355,355,355,355,355,355];

IntensityError = 1.0e-04 *[
    0.4609    0.0000    0.0000    0.0000    0.0000    0.0000    0.4609;
    0.9217    0.0000    0.0000    0.0000    0.0000    0.0000    0.9217;
         0    0.0000    0.0000    0.0000    0.0000    0.0000         0;
    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000;
    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000;
    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000];



    figure;
    mesh(X,Y,IntensityError), hold on; 
    plot3(25,25,0,'*');

enter image description here