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

📄 string541.m

📁 matlab7.0从入门到精通(光盘内容)
💻 M
字号:
function string541

Z = peaks;
h = plot(Z(:,33));
x = get(h,'XData'); % Get the plotted data
y = get(h,'YData');
imin = find(min(y) == y);% Find the index of the min and max
imax = find(max(y) == y);
text(x(imin),y(imin),['Minimum=',num2str(y(imin))],'VerticalAlignment','middle','HorizontalAlignment','left','FontSize',14)
text(x(imax),y(imax),['Maximum=',num2str(y(imax))],'VerticalAlignment','bottom','HorizontalAlignment','right','FontSize',14)
str1(1) = {'Center each line in the Uicontrol'};
str1(2) = {'Also check out the textwrap function'};
str2(1) = {'Each cell is a quoted string'};
str2(2) = {'You can specify how the string is aligned'};
str2(3) = {'You can use LaTeX symbols like \pi \chi \Xi'};
str2(4) = {'\bfOr use bold \rm\itor italic font\rm'};
str2(5) = {'\fontname{courier}Or even change fonts'};
uicontrol('Style','text','Position',[80 80 200 30],'String',str1);
text(45,0,str2,'HorizontalAlignment','right')

⌨️ 快捷键说明

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