资源简介

放大显示matlab输出图像局部区域,放大区域可以随意在原图像拖动,相应的放大区域会显示出来,同时显示放大区域和源图像。

资源截图

代码片段和文件信息

function magnify(f1)
%
%magnify(f1)
%
%  Figure creates a magnification box when under the mouse
%  position when a button is pressed.  Press ‘+‘/‘-‘ while
%  button pressed to increase/decrease magnification. Press
%  ‘>‘/‘<‘ while button pressed to increase/decrease box size.
%  Hold ‘Ctrl‘ while clicking to leave magnification on figure.
%
%  Example:
%     plot(1:100randn(1100)(1:300)/3rand(1300)) grid on
%     magnify;

% Rick Hindman - 7/29/04

if (nargin == 0) f1 = gcf; end;
set(f1 ...
   ‘WindowButtonDownFcn‘  @ButtonDownCallback ...
   ‘WindowButtonUpFcn‘ @ButtonUpCallback ...
   ‘WindowButtonMotionFcn‘ @ButtonMotionCallback ...
   ‘KeyPressFcn‘ @KeyPressCallback);
return;

function ButtonDownCallback(srceventdata)
   f1 = src;
   a1 = ge

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4227  2017-09-17 14:54  magnify.m

----------- ---------  ---------- -----  ----

                 4227                    1


评论

共有 条评论

相关资源