www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/UseDefaultCoordinateSystemForImageExample.m
%% Coordinate System for Images % % Copyright 2015 The MathWorks, Inc. %% Use Default Coordinate System % Display an image using the default coordinate % system. Use colors from the |colorcube| map. C = [1 2 3 4; 5 6 7 8; 9 10 11 12]; im = image(C); colormap(colorcube) %% Specify Coordinate System % Display an image and specify the coordinate system. Use colors from the % |colorcube| map. C = [1 2 3 4; 5 6 7 8; 9 10 11 12]; x = [-1 2]; y = [2 4]; figure image(x,y,C) colormap(colorcube)