How can I get the zero crossing contour of a matrix
20 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
John D'Errico
2023 年 2 月 12 日
編集済み: John D'Errico
2023 年 2 月 12 日
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.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!