修改Matlab代码 读取nc文件中的降水数据data = ncreadCgradsair2mmonmeannc air; 提取时间范围为1979-2022年的数据start_year = 1979;end_year = 2022;data = data start_year-194812+1 end_year-1948+112; 计算每个月的平均值monthly_mean = meandat
% 绘制结果 figure; subplot(2, 1, 1); plot(monthly_change, 'b');
% 添加标题和标签 title('Monthly precipitation change'); xlabel('Month'); ylabel('Precipitation change (mm)');
subplot(2, 1, 2); plot(t, monthly_mean, 'b', t, trend(1)*t+trend(2), 'r');
% 添加标题和标签 title('Monthly precipitation trend'); xlabel('Month'); ylabel('Precipitation (mm)'); legend('Monthly precipitation', 'Trend line');
原文地址: https://www.cveoy.top/t/topic/b2Q0 著作权归作者所有。请勿转载和采集!