MATLAB绘制山区地貌图

1个回答

  • x=1200:400:4000;

    y=1200:400:3600;

    [xx,yy]=meshgrid(x,y);

    zz=[

    1130,1250,1280,1230,1040,900,500,700;

    1320,1450,1420,1400,1300,700,900,850;

    1390,1500,1500,1400,900,1100,1060,950;

    1500,1200,1100,1350,1450,1200,1150,1010;

    1500,1200,1100,1550,1600,1550,1380,1070;

    1500,1550,1600,1550,1600,1600,1600,1550;

    1480,1500,1550,1510,1430,1300,1200,980;

    ]; %自己检察数据.

    surf(xx,yy,zz);

    hold on;

    [c,h]=contour(xx,yy,zz,6);

    clabel(c,h)