fg_10_34.m

来自「英文书《Digital Signal Processing with Examp」· M 代码 · 共 36 行

M
36
字号
% fg_10_34    Read and plot signals w/ no color.
% speech
% Note: You must set your own path here:
fid=fopen('speech.bin','r');
speech=fread(fid,'int');
fclose(fid);

% seismic
% Note: You must set your own path here:
fid=fopen('seismic.bin','r');
seismic=fread(fid,'int');
fclose(fid);

% friends
hike=zeros(256,256);
% Note: You must set your own path here:
fid=fopen('hiking_gray.bin','r');
hike(:)=fread(fid,'int');
fclose(fid);



% Plots
sp_fig(1);
subplot(2,2,1);
plot(speech,'k'); grid on;
title('Speech');
subplot(2,2,3);
plot(seismic,'k'); grid on;
title('Seismic');
subplot(1,2,2);
colormap(gray(256));
image(hike);
axis square;
title('Image');

⌨️ 快捷键说明

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