Sie sind auf Seite 1von 1

p=[0

0
0
0
0
0

0
0
0
1.000000 0.063743 0.918750
0.063743 1.000000 -0.083528
0.918750 -0.083528 1.000000
0.070996 0.921314 0.345396
0
0
0

0
0.070996
0.921314
0.345396
1.000000
0

0
0
0
0
0
0];

set(0,'DefaultAxesColorOrder',c)
imagesc(p); % plot the matrix
n=6;%x=linspace(0,4,n);y=linspace(0,1,n);
L=[' '; 'x_1'; 'x_2'; 'u_1'; 'u_2'; ' ']; % labels
set(gca, 'XTick', 1:n);
% center x-axis ticks on bins
set(gca, 'YTick', 1:n);
% center y-axis ticks on bins
set(gca, 'XTickLabel', L); % set x-axis labels
set(gca, 'YTickLabel', L); % set y-axis labels
title('Correlation matrix', 'FontSize', 14);
% set title
colormap("default");
% set the colorscheme
%axis equal;
colorbar("EastOutside"); % enable colorbar
print -dpng x.png
pause
close all

Das könnte Ihnen auch gefallen