How can I get the zero crossing contour of a matrix
20 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
John D'Errico
il 12 Feb 2023
Modificato: John D'Errico
il 12 Feb 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.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Contour Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!