필터 지우기
필터 지우기

How to calculate height from a Matlab pcolor plot?

조회 수: 3 (최근 30일)
Sachin Nag
Sachin Nag 2017년 5월 1일
댓글: Image Analyst 2017년 5월 2일
I have a pcolor plot in Matlab in which two objects are present. I need to calculate height (basically the distance) between these two objects. (Between the yellow line and the top) I extracted the data from the pcolor plot into a matrix and summed up the values to form one single column. How can I determine the height using this column? Thanks for any pointers or hints.

채택된 답변

Image Analyst
Image Analyst 2017년 5월 1일
Look for the highest peak.
% Get average vertical profile.
verticalProfile = mean(theImage, 2);
% Find highest value and it's row number:
[meanValue, row] = max(verticalProfile);
If that doesn't work then attach your original data (not a screenshot) as a PNG file.
  댓글 수: 5
Sachin Nag
Sachin Nag 2017년 5월 2일
I still have a doubt. How does one obtain height from this? It was a bit unclear to me
Image Analyst
Image Analyst 2017년 5월 2일
I'm not sure what colormap you're using but if yellow is the highest value, then row is the row of the bright straight yellow line at 0.5. Using that plus the scale you used to put the axis in pcolor, you can find the height.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by