필터 지우기
필터 지우기

Area calculation within contour

조회 수: 9 (최근 30일)
William White
William White 2018년 2월 6일
답변: William White 2018년 2월 7일
Sirs, I have the following plot
[C,h] = contour(X,Y,Z,[s,s])
Where s is a variable that I change. This plot the image:
I am interested to calculate the area inside this contour (so I can compare different values of s)
I have attempted to use some previous solutions I have found on this site, to no joy.
I have attached data for X,Y,Z
s can take any value <Z max
kind regards. W
  댓글 수: 4
Image Analyst
Image Analyst 2018년 2월 6일
Someone could if you had given us the data to create your plot. Come on, make it easy for people to help you not hard.
Steven Lord
Steven Lord 2018년 2월 6일
You should give a small sample data set that's more or less representative of your actual problem. That way interested people can test out their suggestions ahead of time to make sure they work.

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

채택된 답변

William White
William White 2018년 2월 7일
I think I have a rather clumsy numeric answer.
I count the number of entries in Z that are equal or larger than s.
Then multiply by the area of a unit "pixel" (because I know the dimensions of X,Y I know how many "pixels" are in X,Y and so the area of that pixel).
Thanks for everybody's help W

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by