How to make a Hovmoller plot?

12 次查看(过去 30 天)
Jonas Damsbo
Jonas Damsbo 2018-11-13
Hi
I'm trying to make a Hovmoller diagram with latitudes out of the x-axis and the time up of the y-axis. The actual plot is the size of the geopotential height gradient, GHGN.
I have tried the code:
GHGN = (z(:,[80+[-1 0 1]])-z(:,[60+[-1 0 1]]))/(80-60)
figure(6);clf
contourf(latr+[-1 0 1],time,GHGN);
shading flat; colorbar
ylabel('Time (days)')
xlabel('Y distance (km)')
However, I got the error "Matrix dimensions must agree."
How do I get done so I can plot?
My variables have the sizes: latr = 1x181. time = 124x1. GHGN = 360x3. z = 360x181
z is dependent on time.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by