Is there a way to find the lengths of the contours in fcontour or other?
11 ビュー (過去 30 日間)
古いコメントを表示
I have a 2D polynomial function of which I am trying to determine the approximate lengths of its level curves/isolines/contours. I know that MATLAB can easily plot these level curves, via the fcontour plot, but I what I need more than a plot itself is the total length of each contour within the domain of the plot. At a cursory glance, there does not appear to be a property of fcontour that gives these length. Is there some way to extract these or do I have to go about writing my own algorithm to get them. Any help or guidance would be greatly appreciated.
0 件のコメント
回答 (1 件)
Walter Roberson
2024 年 11 月 18 日 17:21
You can request the ContourMatrix property of the FunctionContour object returned by fcontour . The ContourMatrix contains information about each contour. You can decode the contour matrix and calculate the length of each perimeter .
A more convenient way of dealing with contour matrix data is to use https://www.mathworks.com/matlabcentral/fileexchange/38863-extract-contour-data-from-contour-matrix-c
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!