📄 scaleimage.m
字号:
function imgsc = scaleimage(img, range)%SCALEIMAGE Scale the image to a specified z-range.%% I = SCALEIMAGE(IMG, ZRANGE)%% SCALEIMAGE scale the image IMG using the ZRANGE% information and the global variable MAPSIZE that% define the colormap size. If zrange is omitted the% image is scale to the min and max values.%% See also IMAGESC.%% Claudio 25 Feb. 1995.%% Copyright (c) 1995 by Claudio Rivetti and Mark Young% claudio@alice.uoregon.edu, mark@alice.uoregon.edu%global MapSize;if nargin ==1 range=[min(min(img)) max(max(img))];endif isempty(range) range=[min(min(img)) max(max(img))];endimin = range(1);imax = range(2);if (imax-imin)==0 imin=0; imax=imin+1e-12;endimgsc = min(MapSize,round((MapSize-1)*(img-imin)/(imax-imin))+1);return
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -