Borrar filtros
Borrar filtros

Create 3D plot from 2D contour (length and radius)

8 visualizaciones (últimos 30 días)
Elliott Kitson
Elliott Kitson el 27 de Mayo de 2021
Comentada: umberto somma el 7 de Feb. de 2023
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

Respuesta aceptada

darova
darova el 27 de Mayo de 2021
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 comentarios
Elliott Kitson
Elliott Kitson el 29 de Mayo de 2021
Sorry, i was getting a little mixed up, this worked perfectly! thank you very much!
umberto somma
umberto somma el 7 de Feb. de 2023
Could you please show me how to get this 3D plot from your initial 2D countour line?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by