Borrar filtros
Borrar filtros

How do i view the velocity profile

2 visualizaciones (últimos 30 días)
Ernest Adisi
Ernest Adisi el 31 de Jul. de 2018
Comentada: KSSV el 31 de Jul. de 2018
I have this code which has reshaped column vectors into matrices, i now want to find the velocity profile for x,y,u,v how do i do this please?
A = importdata(filename,delimiterIn,headerlinesIn);
%%Matrices%%%%
xi = 214; yj = 134;
x= zeros(yj,xi);
y= zeros(yj,xi);
u= zeros(yj,xi);
v= zeros(yj,xi);
%%Matrix population
for j=1:yj
x(j,:) = A.data((j-1)*xi+1:j*xi,1);
y(j,:) = A.data((j-1)*xi+1:j*xi,2);
u(j,:) = A.data((j-1)*xi+1:j*xi,3);
v(j,:) = A.data((j-1)*xi+1:j*xi,4);
end

Respuesta aceptada

KSSV
KSSV el 31 de Jul. de 2018
Read about quiver
quiver(x,y,u,v) ;
  2 comentarios
Ernest Adisi
Ernest Adisi el 31 de Jul. de 2018
yeah, I tried it but it gives a vector plot, I wanted the velocity profile
KSSV
KSSV el 31 de Jul. de 2018
You mean a color plot? Any example picture?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Vector Fields en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by