?? sgltest1.m
字號(hào):
function sgltest1(n)
if isstr(n)
n = str2num(n);
end
x = sin([1:n]/n*(16*pi));
y = abs(fft(x));
y = y(1:n/2);
[m i] = max(y);
subplot(211)
plot(x)
subplot(212)
plot(y)
s = sprintf('Max = %d, Index = %d\n', m, i);
uiwait(msgbox(s, 'Result', 'modal'));
close
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -