How can I get the zero crossing contour of a matrix
20 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I have a matrix of 201x201 size and it has a zero crossing. I am using contour3 to get the contour plot. but i actually need only the contour corresponding to zero values. the image it attached here.
any help would be highly appreciated.
Thank you.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1293445/image.bmp)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1293445/image.bmp)
0 commentaires
Réponse acceptée
John D'Errico
le 12 Fév 2023
Modifié(e) : John D'Errico
le 12 Fév 2023
help contourc
For example:
v = linspace(-5,5,100);
[x,y] = meshgrid(v,v);
z = x.^2 - y.^2 + 1; % The contours will be hyperbolic
contour(x,y,z,[0,0])
C = contourc(v,v,z,[0 0])
There will be two contour lines found, each of which have 176 points in the piecewise curves generated.
So if you want the points along that contour itself, contourc does it. If you want to draw the contour, then I contour will do it easily enough.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Contour Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!