91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 4KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-27
  • 語言: Matlab
  • 標簽: magnify.m??

資源簡介

magnify.m工具是使用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?=?get(f1‘CurrentAxes‘);
???a2?=?copyobj(a1f1);

???set(f1?...
??????‘UserData‘[f1a1a2]?...
??????‘Pointer‘‘fullcrosshair‘?...
??????‘CurrentAxes‘a2);
???set(a2?...
??????‘UserData‘[20.2]?...??%magnification?frame?size
??????‘Color‘get(a1‘Color‘)?...
??????‘Box‘‘on‘);
???xlabel(‘‘);?ylabel(‘‘);?zlabel(‘‘);?title(‘‘);
???set(get(a2‘Children‘)?...
??????‘LineWidth‘?2);
???set(a1?...
??????‘Color‘get(a1‘Color‘)*0.95);
???set(f1?...
??????‘CurrentAxes‘a1);
???ButtonMotionCallback(src);
return;

function?ButtonUpCallback(srceventdata)
???H?=?get(src‘UserData‘);
???f1?=?H(1);?a1?=?H(2);?a2?=?H(3);
???set(a1?...
??????‘Color‘get(a2‘Color‘));
???set(f1?...
??????‘UserData‘[]?...
??????‘Pointer‘‘arrow‘?...
??????‘CurrentAxes‘a1);
???if?~strcmp(get(f1‘SelectionType‘)‘alt‘)
??????delete(a2);
???end;
return;

function?ButtonMotionCallback(srceventdata)
???H?=?get(src‘UserData‘);
???if?~isempty(H)
??????f1?=?H(1);?a1?=?H(2);?a2?=?H(3);
??????a2_param?=?get(a2‘UserData‘);
??????f_pos?=?get(f1‘Position‘);
??????a1_pos?=?get(a1‘Position‘);

??????[f_cp?a1_cp]?=?pointer2d(f1a1);

??????set(a2‘Position‘[(f_cp./f_pos(3:4))?0?0]+a2_param(2)*a1_pos(3)*[-1?-1?2?2]);
??????a2_pos?=?get(a2‘Position‘);

??? set(a2‘XLim‘a1_

評論

共有 條評論

相關資源