"Plot" a matrix
Show older comments
Hello, dear members of this community! Can someone help me?
I have an array whose entries represent energy. Would I like to "plot" this array using a color palette, so you can quickly see the regions of high concentration of energy and also the low concentration of energy.
How can I do that? I thank anyone who can help.
Regards,
Accepted Answer
More Answers (2)
Walter Roberson
on 18 Nov 2015
imagesc(YourArray)
colormap(hot(256))
Image Analyst
on 18 Nov 2015
If you don't want 3D-ish graphics, then just use imshow(). It's in base MATLAB now. If you don't have it, use image() or imagesc().
imshow(yourMatrix, []);
colormap(jet(256)); % There are a variety of other built-in colormaps beyond jet.
colorbar;
Otherwise, see if any of the plots in the "MATLAB Gallery" are what you want: http://www.mathworks.com/discovery/gallery.html
Categories
Find more on Contour Plots 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!