www.gusucode.com > 《matlab图像处理与界面编程宝典》秦襄培 编著,每章的MATLAB源代码程序 > 第27章/代码27-12.txt

     
method = 'Bilinear';
switch lower(method)           
   case {'linear','bilinear'}    % 判断
      disp('Method is linear')   % 执行程序
   case 'cubic'                  % 判断
      disp('Method is cubic')    % 执行程序
   case 'nearest'                % 判断
      disp('Method is nearest')  % 执行程序
   otherwise                     % 判断
      disp('Unknown method.')    % 执行程序
end