how to plot a distribution curve
조회 수: 2 (최근 30일)
이전 댓글 표시
hi, I want to plot a chart like attached figure with Matlab, it is for steady state head distribution curve, can anyone help me? thanks
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191929/image.jpeg)
댓글 수: 1
dpb
2018년 7월 15일
Probably
doc contour
can help.
You might attach the data as .mat file; somebody may take time to see how to use it...
답변 (1개)
Aquatris
2018년 7월 15일
Here is a sample code with made up x, y, and z;
x = 0:10:100;
y = 0:10:200;
[X,Y] = meshgrid(x,y);
Z = X.^2+Y.^2;
[~,h] = contour(X,Y,Z);
set(h,'ShowText','on')
As suggested in the comments, you can look into the documentation for 'contour' function to learn more and be able to obtain the graph you want.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!