《matlabmagnify源程序(最新整理)》由会员分享,可在线阅读,更多相关《matlabmagnify源程序(最新整理)(6页珍藏版)》请在人人文库网上搜索。
1、 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/) | strcmp(get(f1,CurrentCharacter),.)a2_param(2) = a2_param(2)*1.2; end;set(a2,Us。
2、erData,a2_param); ButtonMotionCallback(src); end;return;% Included for completeness (usually in own file)function fig_pointer_pos, axes_pointer_val = pointer2d(fig_hndl,axes_hndl)%pointer2d(fig_hndl,axes_hndl)%Returns the coordinates of the pointer (in pixels)%in the desired figure (fig_hndl) and th。
3、e coordinates%in the desired axis (axes coordinates)% Example:% figure(1),% hold on,% for i = 1:1000,%figp,axp=pointer2d;%plot(axp(1),axp(2),.,EraseMode,none);%drawnow;% end;% hold off% Rick Hindman - 4/18/01if (nargin = 0), fig_hndl = gcf; axes_hndl = gca; end;if (nargin = 1), axes_hndl = get(fig_h。
4、ndl,CurrentAxes); end;set(fig_hndl,Units,pixels);pointer_pos = get(0,PointerLocation);%pixels 0,0 lower left fig_pos = get(fig_hndl,Position);%pixels l,b,w,hfig_pointer_pos = pointer_pos - fig_pos(1,2); set(fig_hndl,CurrentPoint,fig_pointer_pos);if (isempty(axes_hndl), axes_pointer_val = ; elseif (n。
5、argout = 2),axes_pointer_line = get(axes_hndl,CurrentPoint); axes_pointer_val = sum(axes_pointer_line)/2; end;% end of program“”“”At the end, Xiao Bian gives you a passage. Minand once said, people who learn to learn are very happy people. In every wonderful life, learning is an eternal theme. As a 。
6、professional clerical and teaching position, I understand the importance of continuous learning, life is diligent, nothing can be gained, only continuous learning can achieve better self. Only by constantly learning and mastering the latest relevant knowledge, can employees from all walks of life keep up with the pace of enterprise development and innovate to meet the needs of the market. This document is also edited by my studio professionals, there may be errors in the document, if there are errors, please correct, thank you。