⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imagesc_improve.m

📁 高级图像显示
💻 M
字号:
function h = imagesc(varargin)
%IMAGESC Scale data and display as image.
%   IMAGESC(...) is the same as IMAGE(...) except the data is scaled
%   to use the full colormap.
%   
%   IMAGESC(...,CLIM) where CLIM = [CLOW CHIGH] can specify the
%   scaling.
%
%   See also IMAGE, COLORBAR, IMREAD, IMWRITE.

%   Copyright 1984-2003 The MathWorks, Inc.
%   $Revision: 5.11.4.3 $  $Date: 2004/04/10 23:31:52 $

clim = [];
if nargin == 0,
  hh = image('CDataMapping','scaled');
elseif nargin == 1,
  hh = image(varargin{1},'CDataMapping','scaled');
elseif nargin > 1,

  % Determine if last input is clim
  if isequal(size(varargin{end}),[1 2])
    for i=length(varargin):-1:1,
      str(i) = isstr(varargin{i});
    end
    str = find(str);
    if isempty(str) | (rem(length(varargin)-min(str),2)==0), 
       clim = varargin{end};
       varargin(end) = []; % Remove last cell
    else
       clim = [];
    end
  else
     clim = [];
  end
  hh = image(varargin{:},'CDataMapping','scaled');
end

% Get the parent Axes of the image
cax = ancestor(hh,'axes');

if ~isempty(clim),
  set(cax,'CLim',clim)
elseif ~ishold(cax),
  set(cax,'CLimMode','auto')
end

if nargout > 0
    h = hh;
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -