magnify matlab源程序.docx
《magnify matlab源程序.docx》由会员分享,可在线阅读,更多相关《magnify matlab源程序.docx(7页珍藏版)》请在三一办公上搜索。
1、magnify matlab源程序% start of program 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.% Hol
2、d Ctrl while clicking to leave magnification on figure.% Example:% plot(1:100,randn(1,100),(1:300)/3,rand(1,300), grid on,% magnify;if (nargin = 0), f1 = gcf; end;figure(f1); set(f1, .WindowButtonDownFcn, ButtonDownCallback, .WindowButtonUpFcn, ButtonUpCallback, .WindowButtonMotionFcn, ButtonMotionC
3、allback, .KeyPressFcn, KeyPressCallback);return;function ButtonDownCallback(src,eventdata)f1 = src;a1 = get(f1,CurrentAxes);a2 = copyobj(a1,f1);set(f1, .UserData,f1,a1,a2, .Pointer,fullcrosshair, .CurrentAxes,a2);set(a2, .UserData,2,0.2, . %magnification, frame sizeColor,get(a1,Color), .Box,on);xlab
4、el(); 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(src,eventdata)H = get(src,UserData);f1 = H(1); a1 = H(2); a2 = H(3);set(a1, .Color,get(a2,Color);set(f1, .Use
5、rData, .Pointer,arrow, .CurrentAxes,a1);if strcmp(get(f1,SelectionType),alt),delete(a2);end;return;function ButtonMotionCallback(src,eventdata)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
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- magnify matlab源程序 matlab 源程序

链接地址:https://www.31ppt.com/p-3161139.html