www.gusucode.com > econ 案例源码程序 matlab代码 > econ/PlotPearsonsCorrelationCoefficientsExample.m

    %% Plot Pearson's Correlation Coefficients  
% Plot correlations between multiple time series.   

% Copyright 2015 The MathWorks, Inc.


%% 
% Load data on Canadian inflation and interest rates. 
load Data_Canada  

%% 
% Plot the Pearson's linear correlation coefficients between all pairs of
% variables. 
corrplot(DataTable)    

%%
% The correlation plot shows that the short-term, medium-term, and long-term
% interest rates are highly correlated.  

%% 
% To examine the timestamp of a datum, enter |gname(dates)| into the Command
% Window, and the software presents an interactive cross hair over the plot.
% To expose the timestamp of a datum, click it using the cross hair.