Convert a integer matrix to a red and blue colored matrix
1 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Chunru
2022-9-10
A = [-1 1 1; 1 -1 1; -1 -1 -1]
imagesc(A);
% select a colormap
cmap = hsv(8); % based on hsv
cmap = cmap([5 1], :); % choose color 5 and 1
colormap(cmap);
colorbar
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Orange 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!