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

📄 clip.m

📁 matlab的steel金字塔小波分解源代码
💻 M
字号:
% [RES] = clip(IM, MINVALorRANGE, MAXVAL)%% Clip values of matrix IM to lie between minVal and maxVal:%      RES = max(min(IM,MAXVAL),MINVAL)% The first argument can also specify both min and max, as a 2-vector.% If only one argument is passed, the range defaults to [0,1].function res = clip(im, minValOrRange, maxVal)if (exist('minValOrRange') ~= 1)   minVal = 0;   maxVal = 1;elseif (length(minValOrRange) == 2)  minVal = minValOrRange(1);  maxVal = minValOrRange(2);elseif (length(minValOrRange) == 1)  minVal = minValOrRange;  if (exist('maxVal') ~= 1)    maxVal=minVal+1;  endelse  error('MINVAL must be  a scalar or a 2-vector');endif ( maxVal < minVal )  error('MAXVAL should be less than MINVAL');endres = im;res(find(im < minVal)) = minVal;res(find(im > maxVal)) = maxVal;

⌨️ 快捷键说明

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