?? string541.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 + -