10-03.txt
来自「《MATLAB R2007基础教程》 清华大学出版社,包含电子课件,实例原文件,」· 文本 代码 · 共 20 行
TXT
20 行
>> x = -2*pi:pi/12:2*pi;
>> y = x.^2;
>> subplot(2,2,1:2)
>> plot(x,y)
>> h1=subplot(223);
>> y = x.^4;
>> plot(x,y)
>> h2=subplot(224);
>> y = x.^5;
>> plot(x,y)
>> p1 = get(h1,'Position');
>> t1 = get(h1,'TightInset');
>> p2 = get(h2,'Position');
>> t2 = get(h2,'TightInset');
>> x1 = p1(1)-t1(1); y1 = p1(2)-t1(2);
>> x2 = p2(1)-t2(1); y2 = p2(2)-t2(2);
>> w = x2-x1+t1(1)+p2(3)+t2(3); h = p2(4)+t2(2)+t2(4);
>> annotation('rectangle',[x1,y1,w,h],...
'FaceAlpha',.2,'FaceColor','red','EdgeColor','red');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?