代码:
clc;
clear;
load('CRO-C3.mat')
data=[GPP_DT_VUT_REF,EVI,NDVI,NIRv,kNDVI,LSWI,FPAR,TA_F,VPD_F,SW_IN_F];
rho = corr(data, 'type','pearson');
% rho = corr(data, 'type','Spearman');
% rho = corr(data, 'type','Kendall');
string_name={'GPP','EVI','NDVI','NIRv','kNDVI','LSWI','FPAR','TA','VPD','SW'};
xvalues = string_name;
yvalues = string_name;
h = heatmap(xvalues,yvalues, rho, 'FontSize',10,'FontName','Times New Roman');
H.Title = 'pearson 相关系数矩阵';
colormap summer
结果:
参考资料:
https://zhuanlan.zhihu.com/p/449099421文章来源:https://www.toymoban.com/news/detail-706450.html
https://ww2.mathworks.cn/help/matlab/ref/heatmap.html文章来源地址https://www.toymoban.com/news/detail-706450.html
到了这里,关于matlab相关性分析(皮尔逊,肯德尔,斯皮尔曼)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!