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.

imagePurpose2imageDisplay image objectSyntaxDescriptionimage(C)image(x,y,C)image(...,'PropertyName',PropertyValue,...)image('PropertyName',PropertyValue,...) Formal synatx – PN/PV onlyhandle = image(...)image creates an image graphics object by interpreting each element in amatrix as an index into the figure’s colormap or directly as RGB values,depending on the data specified.The image function has two forms:• A high-level function that calls newplot to determine where to draw thegraphics objects and sets the following axes properties:XLim and YLim to enclose the imageLayer to top to place the image in front of the tick marks and grid linesYDir to reverseView to [0 90]• A low-level function that adds the image to the current axes without callingnewplot. The low-level function argument list can contain only propertyname/property value pairs.You can specify properties as property name/property value pairs, structurearrays, and cell arrays (see set and get for examples of how to specify thesedata types).image(C) displays matrix C as an image. Each element of C specifies the colorof a rectangular segment in the image.image(x,y,C) where x and y are two-element vectors, specifies the range of thex- and y-axis labels, but produces the same image as image(C). This can beuseful, for example, if you want the axis tick labels to correspond to realphysical dimensions represented by the image.2-228

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

Saved successfully!

Ooh no, something went wrong!