Create 3D plot from 2D contour (length and radius)
조회 수: 12 (최근 30일)
이전 댓글 표시
I have a 2D axisymmetric contour of a converging-Diverging nozzle as shown below:
I want to turn this contour into a 3D plot, any ideas of what the best way of doing this is? I’ve tried using linspace and mesh grid but I’ve hit a brick wall.
Many thanks, Elliott
댓글 수: 0
채택된 답변
darova
2021년 5월 27일
See this example
z = 0:.1:3;
r = sin(z);
t = linspace(0,2*pi,20);
[T,R] = meshgrid(t,r);
[~,Z] = meshgrid(t,z);
[X,Y] = pol2cart(T,R);
surf(X,Y,Z)
댓글 수: 4
umberto somma
2023년 2월 7일
Could you please show me how to get this 3D plot from your initial 2D countour line?
추가 답변 (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!