Is there a way to find the lengths of the contours in fcontour or other?

11 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

Walter Roberson
Walter Roberson il 18 Nov 2024 alle 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

Categorie

Scopri di più su Contour Plots in Help Center e File Exchange

Prodotti


Release

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by