plotting streamlines from velocity components
Mostrar comentarios más antiguos
I am having trouble creating streamlines in MATLAB. I have: (1) x,y,z coordinates and (2) velocity components (Vx, Vy, Vz).
I have no trouble plotting the quiver (arrow) plot, but I cannot figure out the streamlines.
Any help would be greatly appreciated.
Thanks,
-Mike
3 comentarios
Wick
el 1 de Mayo de 2018
Have you tried the 'streamline' command? The example in the help is decent. The trick is you've got to pick the (x, y, z) points to start from and it will "connect the dots" from there until the streams pass outside of the range of the data. It doesn't automatically create a new streamline for every data point.
Michael Wales
el 1 de Mayo de 2018
So your X and and Y are not plaid (as if created by meshgrid).
Are you fields continuous, differentiable, and functions? That is, for every (x,y,z) value, do you only have one (u,v,w)? If so, your best bet is to create a 3D plaid grid using ndgrid covering the (x,y,z) domain of interest. Then use some sort of interpolation to fill in the velocities for every point. The function 'scatteredInterpolant' is probably your friend here. The you can use commands like mesh, surf, slice, streamlines, and others that expect 2- or 3D rectangular data to work with.
Edit: I'm not sure my comment addressed your concern. Can you upload a .mat file with some values I can try to work with? I can then write you some code that will manipulate it properly.
Respuesta aceptada
Más respuestas (2)
Michael Wales
el 1 de Mayo de 2018
0 votos
Syed Fazuruddin
el 1 de Abr. de 2020
0 votos
How to draw a wavy wall of a square in matlab
Categorías
Más información sobre Vector Fields en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!