Grayscale Image with z-dimension as Grayscale value

조회 수: 1 (최근 30일)
Vinit Nagda
Vinit Nagda 2017년 7월 15일
댓글: Walter Roberson 2017년 7월 15일
I have data comprising pixel location (x,y) and corresponding height (z) at particular pixel location. I want to plot 2D grayscale Image with my z dimension as grayscale value across varying xy positions.

답변 (1개)

Walter Roberson
Walter Roberson 2017년 7월 15일
surf(z, 'edgecolor', 'none')
colormap(gray(256))

Community Treasure Hunt

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

Start Hunting!

Translated by