In this case, index(24) is the 24th color of the colormap and is red () while index(48) is the 48th color of the colormap and is yellow (). The index of the rest of the row vectors (or RGB triplets, or colors, or whatever) will define the rest of the color assignments in the colormap by interpolating between nodes. ![]() Note that MATLAB does not know the standard RGB triplets so eventually they would have to be normalized (divided by 255).ĭefine the index of each node in the colormap. You do not need to define all 64 color explicitly (though that is not out of the question). The rest of the rows define colors at specific points in the colormap. The first row specifies the one end of the colormap (in this example almost black) and the last row specifies the opposite end (in this example white). Then define color nodes in realistic RGB color-per-row vectors. ![]() So here is what I would do:ĭefine number of colors in the colormap (as mentioned earlier that is a given). I prefer to keep my fingers on the keyboard. The documentation is also available on-line here (but it is frequently slooowww prefer the local help if it is installed). You can do some cool stuff with the colormap GUI The help menu has some good examples. MATLAB makes it very easy to generate custom maps by offering two possibilities: The one is to use the colormap editor GUI The other is to do a bit of typing and use your brain at the same time! Note that to recall the default color map single quotes are need (for yet another unknown reason!)įrequently the predefined color maps are not sufficient to generate a useful graphic in a quantitative sense. To change the colormap to another predefined one you can use the function colormap. The spectrogram is displayed with the default colormap which is very good for general purpose display of information. You can calculate the time - frequency spectrogram of the signal using the function spectrogram (which replaced the function specgram available in older releases All these name changes are annoying.) Also use the function colorbar to display the current colormap. Say you have an RF signal (40 MHz sampling frequency) in vector x: However, it is very easy to generate your own color maps in order to highlight (or mask) particular aspects of an image. My favorite maps are: default, bone, gray, hot. MATLAB offers a number of color maps (I think 17 on R2008b) which are well thought out.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |