Is there a way to find the lengths of the contours in fcontour or other?
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
David Gillcrist
el 18 de Nov. de 2024 a las 17:07
Respondida: Walter Roberson
el 18 de Nov. de 2024 a las 17:21
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 comentarios
Respuestas (1)
Walter Roberson
el 18 de Nov. de 2024 a las 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 comentarios
Ver también
Categorías
Más información sobre Contour Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!