plotting streamlines from velocity components
Afficher commentaires plus anciens
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 commentaires
Wick
le 1 Mai 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
le 1 Mai 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.
Réponse acceptée
Plus de réponses (2)
Michael Wales
le 1 Mai 2018
0 votes
Syed Fazuruddin
le 1 Avr 2020
0 votes
How to draw a wavy wall of a square in matlab
Catégories
En savoir plus sur Vector Fields dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!