Increasing contour levels non-linearly
4 次查看(过去 30 天)
显示 更早的评论
I am writing a CFD code. The output of the stream function contour shows this,
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/157786/image.jpeg)
This is because at the two corners, the stream function value is almost 0.0001 level, or 0.00001, which are very small. I have shown the detailed values of the stream function in the excel attachment.
However, I want to get my stream function contour look like this,
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/157788/image.jpeg)
Where the details at the two bottom corners are shown as well.
How should I achieve this?
0 个评论
采纳的回答
Brendan Hamm
2016-11-8
You can control the levels which are displayed by using the syntax:
contour(Z,levels)
where Z is the data and levels define the contour levels. Likely you want to use log-spaced data and not linearly spaced (which contour uses by default).
levels = logspace(-5,-1,11); % 11 points from 10^-5 to 10^-1
contour(Z,levels)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computational Fluid Dynamics (CFD) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!