Visualize pressure on a cylinder surface

I have text file (Pressure.txt) with the cylinder's coordinate (x,y,z) in the first three columns and pressure values for each point in the fourth column (don't consider the fifth column of the file). How could I visulize the pressure distributiion on the external surface of the cylinder?
Thank you

2 comentarios

KSSV
KSSV el 8 de Feb. de 2019
Attach your file.....visulazation depends on how is your data...structured or unstructured.....so it is better to attach the data for straight help.
Martino Carlo Moruzzi
Martino Carlo Moruzzi el 8 de Feb. de 2019
I attached the file Pressure.txt (don't consider the fifth column). Thank

Iniciar sesión para comentar.

 Respuesta aceptada

Adam Danz
Adam Danz el 8 de Feb. de 2019
Editada: Adam Danz el 8 de Feb. de 2019
Assuming your data are stored in a matrix named 'data',
X = reshape(data(:,1), length(unique(data(:,1))), []);
Y = reshape(data(:,2), length(unique(data(:,1))), []);
Z = reshape(data(:,3), length(unique(data(:,1))), []);
C = reshape(data(:,4), length(unique(data(:,1))), []);
surf(X,Y,Z,C)
axis equal
ch = colorbar;
ylabel(ch, 'Pressure') %not shown in image

Más respuestas (0)

Preguntada:

el 8 de Feb. de 2019

Editada:

el 8 de Feb. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by