how to example program about enso shifting

4 views (last 30 days)
hy everyone, i new to matlab. i use matlab 2013a. my problem is not understanding in making programs in the form of looping functions for different years. my data is in the form of netcdf. the matrix of my data is 855*6. 855, starting 1948 until 2019 and each year consist of 12 months. the different years are for example 1987, 1998, 2000, and 2006. i ask ou thank you for giving me advice and hel with my problem.
  15 Comments
Geoff Hayes
Geoff Hayes on 18 Jul 2019
the latitude is averaged...why the latitude and not one of the other parameters? Can you attach some of your data? Can you show some of your code? Are you able to get the years that you want? How does this data relate to the 855x6 array?
Evelyne Aiyana
Evelyne Aiyana on 19 Jul 2019
Edited: Evelyne Aiyana on 19 Jul 2019
code:
month=[t2 angin_o2'];
%%%definisikan fungsi waktu%%%
yr= month(month(:,1)>=0,:);
%%PEMBAGIAN TAHUN EL NINO KUAT
yr = month (month(:,1)>=0,:);
yr_1951= yr ((yr(:,1)==1951),:);
yr_1957= yr ((yr(:,1)==1957),:);
yr_1963= yr ((yr(:,1)==1963),:);
yr_1965= yr ((yr(:,1)==1965),:);
yr_1966= yr ((yr(:,1)==1966),:);
yr_1969= yr ((yr(:,1)==1969),:);
yr_1972= yr ((yr(:,1)==1972),:);
yr_1982= yr ((yr(:,1)==1982),:);
yr_1983= yr ((yr(:,1)==1983),:);
yr_1987= yr ((yr(:,1)==1987),:);
yr_1991= yr ((yr(:,1)==1991),:);
yr_1992= yr ((yr(:,1)==1992),:);
yr_1997= yr ((yr(:,1)==1997),:);
yr_1998= yr ((yr(:,1)==1998),:);
yr_2015= yr ((yr(:,1)==2015),:);
yr_2016= yr ((yr(:,1)==2016),:);
%%%gabungkan
y_m = [yr_1951; yr_1957;yr_1963;yr_1965;yr_1966;yr_1972;yr_1982;yr_1983;yr_1987;yr_1992;yr_1997;yr_1998;yr_2015;yr_2016;]
y_m1= y_m(:,7:150);
% y_m2=y_m1';
h=y_m1(1:12,:)
contour(lon(1:12:144), y,h);
% y_m1=y_m(:,7:150);
% contour(lon(:),y,y_m1);
latitude must be averaged as well as in my research the x, y, z contour plot is needed between longitude and level. The value of z expresses vertical wind data.
I have received the desired year related to the 855 * 6 array and already combined with vertical wind data.
and when I want the plot there is an error that is
Error using contour (line 81)
The size of X must match the size of Z or the number of columns of Z.
Error in baca_reanalysis_ganbatte100 (line 107)
contour(lon(1:12:144), y,h);
how is the solution? thank you in advance

Sign in to comment.

Answers (0)

Categories

Find more on Geographic Plots in Help Center and File Exchange

Products


Release

R2013a

Community Treasure Hunt

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

Start Hunting!