⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stretch.m

📁 线性代数实验及MATLAB入门,电子工业出版社出版 陈怀琛 龚杰民合著
💻 M
字号:
function stretch
% This function checks the images and sets the four axes so they
% are the same, and are able to display the largest image.
%
% Written by Emily H. Moore, Grinnell College, 5/23/96
hh = sort(findobj(gcf, 'type', 'axes'));
num = 1;
for j = 1:4                                     % Find max redius of images
 hc  = get(hh(j), 'child' );
 types=get(hc,'type');
 for i=1:length(hc)
    if types{i}(1)=='p';
       vx = get(hc(i), 'xdata');
       vy = get(hc(i), 'ydata');
       m  = sqrt( max(vx.^2 + vy.^2))*1.2;
       if m > num
	      num = m;
       end
    end
   end
end
vec = [-num, num, -num, num];
for i = 1:4                                     % Set all four axes
   axes(hh(i))
   axis(vec)
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -