>> A=rand(5)
A =
0.6541 0.2290 0.9961 0.0046 0.3998
0.6892 0.9133 0.0782 0.7749 0.2599
0.7482 0.1524 0.4427 0.8173 0.8001
0.4505 0.8258 0.1067 0.8687 0.4314
0.0838 0.5383 0.9619 0.0844 0.9106
>> HeatMap(A,'Colormap',redbluecmap) %用红蓝colorbar
HeatMap object with 5 rows and 5 columns.