Area calculation within contour
古いコメントを表示
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 件のコメント
Jan
2018 年 2 月 6 日
Please mention these "some previous solutions" and explain "to no joy" with details. It would be a waste of time to suggest these methods again and maybe you had only a typo in your method to call these solutions.
Image Analyst
2018 年 2 月 6 日
Did you try the polyarea() function? I'm going to assume you did and for some reason you believe it's giving you the wrong area. So, I don't know, polyarea() is what I would have tried and if you say it doesn't give the right answer then I have nothing else to suggest (unless you want to convert the data to a digital image).
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
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.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!