How Can I plot a complex matrix based on a threshold value
1 view (last 30 days)
Show older comments
I have a 100X100 complex double matrix, and I want to plot (surf or imagesc) by mapping values to red that are greater then a threshould (can be any value) and white if less then threshould.
4 Comments
Akira Agata
on 12 Jan 2019
Like this?
% 100x100 complex double matrix
X = rand(100,100) + 1i*rand(100,100);
% Index of some metric (e.g absolute value) > threshold (e.g 1)
idx = abs(X) > 1;
% Show the result (Red: |X| > 1, White: |X| <= 1)
imagesc(idx)
colormap([1 1 1;1 0 0])
Answers (0)
See Also
Categories
Find more on Colormaps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!