I am a beginner in matlab. I am running Tethys and Clara modelling code, and i want to find the mean of each month for 4 years. I am using the "datam" function to do this. I am able to get a plot for 12 months of a particular year.
figure(1);
hold on
X1 = [];
Y1 = [];
X2 = [];
Y2 = [];
for i=1:12
I=(Datam(:,1)==2013)&(Datam(:,2)==i);
ET_obs_2013 = ET_obs(I==1);
ET_obs_mean = mean(ET_obs_2013);
ET_sim_2013 = ET_sim(I==1);
ET_sim_mean = mean(ET_sim_2013);
X1 = [X1,i];
Y1 = [Y1,ET_obs_mean];
X2 = [X2,i];
Y2 = [Y2,ET_sim_mean];
plot(X1,Y1);
plot(X2,Y2);
end
Could you help me check this as well as help with what am looking for?
0 Comments
Sign in to comment.