Plotting a vertical wind profile (direction and intensity)

27 views (last 30 days)
Hi,
I am trying to plot a vertical wind profile from using quiver. For now I had little to no success and I could really use some help. Here is my problem:
I have wind comenents u and v at different heights z. For example:
u=[-3.3939, -3.3114,-3.0002,-3.569 ,-4.5501,-5.0276,-5.4330,-5.8136,-5.5932,-5.0989]
v=[0.7531, 0.9402, 1.4697, 1.1063, 1.1577, 0.7243, 0.4756, 0.3075, 0.5864, 0.6493];
z=[100,200,300,400,500,600,700,800,900,1000];
I would like to have a plot with at every height an arrow (or if it possible a wind barb but let's just stick with the arrow for now) with the direction of the arrow related to the wind speed and it direction to its wind direction. Since the quiver function wants as inputs x,y u and v I created a dummy x vector of ones.
x=[1,1,1,1,1,1,1,1,1,1];
Then I try to plot using quiver as
quiver(x,z,u,v)
this -kind of work- but for the real case (more arrows) the visualization is not good. I tried to change the scale but with no better results.
Is there a smarter way that does not involve quiver to make the plot looks better, or what should I change in quiver properties?
thanks in advance
  3 Comments
giacomo labbri
giacomo labbri on 11 Dec 2020
For example this would be a better output (just take a column)
giacomo labbri
giacomo labbri on 11 Dec 2020
Edited: giacomo labbri on 11 Dec 2020
I tried to play around a bit more and I feel like the problem is the uneven grid the quiver creates using x and z. Since the z spans a bigger range then x the vector then the vecor direction (that is detemined by u and v but depends also on the cartesian axis created from x and z) is not right. That can be seen putting a 1 and 1 value in u and v and setting the scale to 0 to avoid automatic scaling. the output is not at 45° as it shoud be. But I still don't know how to solve this

Sign in to comment.

Answers (1)

Pratheek Punchathody
Pratheek Punchathody on 20 Jan 2021
Edited: Pratheek Punchathody on 20 Jan 2021
As per the reference image on your comment, to make Quiver plot better, you can refer to the documentation on some of the properties, Arrows, Markers, Data.

Categories

Find more on Vector Fields in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!