12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Image PropertiesA true color specification for CData requires an m-by-n-by-3 array of RGBvalues. The first page contains the red component, the second page the greencomponent, and the third page the blue component of each element in theimage. RGB values range from 0 to 1. The following picture illustrates therelative dimensions of CData for the two color models.Indexed ColorsCDataTrue ColorsBlueGreenRedCDataIf CData has only one row or column, the height or width respectively is alwaysone data unit and is centered about the first YData or XData elementrespectively. For example, using a 4-by-1 matrix of random data,C = rand(4,1);image(C,'CDataMapping','scaled')axis image2-236

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!