How I can produce a colour contour map?

I have a data set in the form M=(180*360*12) where 180 is the latitude, 360 longitude and 12 is the averaged data for 12 months for 32 years. i want to plot contour map of it. i have proceeded this way, can somebody look into it and let me know what i am doing wrong here.
[lon lat]=Meshgrid(linspace(min(lon),max(lon)),linspace(min(lat),max(lat)));
contourf(lon,lat,M(:,3));
Thanks

3 Kommentare

Hydro
Hydro am 10 Dez. 2014
Thanks Wolski,
I need to deduct my computed mean (the one mentioned earlier) from my original data which is in order (180*360*384). 384 is the number of months (32 years).
Can you please suggest a way forward?
Sean de Wolski
Sean de Wolski am 10 Dez. 2014
So the mean for each month?
And each slice is monthological? Jan, Feb,...Dec, Jan, Feb,...Dec?
Here is my complete coding what i did so far,
R=reshape(sst,180,360,12,32);% reshaping the data in 12*32 form
M=mean(R,4);
contourf(M(:,:,3));
I reshape my data to get the average for each month through 32 years...so for all january i averaged it across 32 years...and same for the other. now I plot the averaged only (you helped me out with this) now i need to deduct this mean from each of its corresponding month to get the anomalies. Then I need to plot the anomalies.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Sean de Wolski
Sean de Wolski am 10 Dez. 2014
Bearbeitet: Sean de Wolski am 10 Dez. 2014

0 Stimmen

contourf(M(:,:,3)) % all rows, columns and third page
You should also consider using contourm. Otherwise your lat/lon data will not be represent properly unless you project it into x/y using mfwdtran

1 Kommentar

Hydro
Hydro am 10 Dez. 2014
Here is all what I need to do however, i am really struggling and i need to finish this in couple of hours. I would really appreciate any help in this regards, in fact, you will save my life.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Polar Plots finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 10 Dez. 2014

Kommentiert:

am 10 Dez. 2014

Community Treasure Hunt

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

Start Hunting!

Translated by