How to visualize the matrix with colored entries

128 ビュー (過去 30 日間)
Anastasiya 2013 年 6 月 17 日
Dear all, I have a matrix with some suspicious entries. I would like to show all entries (all numbers) and color by red my suspicious data. I have no idea how to do it:( Thanks!
  2 件のコメント
Anastasiya 2013 年 6 月 17 日
Thanks, Evan. I guess I would like to color certain data points by red, but having all the values.


回答 (1 件)

Kye Taylor
Kye Taylor 2013 年 6 月 17 日
編集済み: Kye Taylor 2013 年 6 月 17 日
What are the features that make your data suspicious? For example, if the suspicious data is all very large (say 2 standard deviations larger than the average datum), then you could try something like
% a proxy for your matrix
dataMatrix = randn(100,100);
% logical variable
isSuspect = dataMatrix > mean(dataMatrix(:))+2*std(dataMatrix(:));
% create an image where each pixel represents an entry in dataMatrix.
% the pixel will be red if isSuspect(i,j) is true
% or (less exciting)
  2 件のコメント
Fatemeh Sadeghihassanabadi
Fatemeh Sadeghihassanabadi 2021 年 5 月 4 日
you can also try heatmap function:


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by