How can I get the zero crossing contour of a matrix
20 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
harsha
am 12 Feb. 2023
Kommentiert: harsha
am 13 Feb. 2023
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 Kommentare
Akzeptierte Antwort
John D'Errico
am 12 Feb. 2023
Bearbeitet: John D'Errico
am 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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Contour Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!