Obtain intensity of each pixel in a contour plot?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have generated a contour plot with a dimension size of 101 x 102 pixels. I would like to obtain the "level" of each pixel (which I interpret as being the relative intensity of that pixel) and then reshape that into the same size plot. I know that I can click on each pixel and it will tell me the level, but I was wondering if there was a code I could use to return all intensity values for all pixels. Thanks.
댓글 수: 0
답변 (1개)
darova
2021년 3월 12일
You can extract each contour separately
[c,h] = contour(x,y,z);
h1 = get(h,'children');
for i = 1:length(h1)
x = get(h1(i),'xdata');
y = get(h1(i),'ydata');
line(x,y,'color',rand(1,3))
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!