readsounds.m
来自「这是盲信号的代码 都已经通过编译了 做这方面的同仁可以参考一下 我觉得蛮惯用的」· M 代码 · 共 20 行
M
20 行
function sounds=readsounds(files)
% READSOUNDS looks in a directory "sounds/" for sound files and
% returns them in a NxP matrix called "sounds" where N is the number
% of sounds specified, and P is the length of the shortest one (the
% others are truncated). One caveat: the filenames MUST all have the
% same number of characters since they are stored in a matrix (what else?!).
%
% Example call:
% sounds=readsounds(['word2';'word1']);
%copyright 2005.6.22
minlen=1e10;
for fileno=1:size(files,1),
fprintf('reading %s \n', files(fileno,:));
temp=auread(['/home/tony/Matlab/sounds/' files(fileno,:)])';
len=size(temp,2);
if minlen>len, minlen=len; end;
sounds(fileno,1:minlen)=temp(1:minlen);
end;
sounds=sounds(:,1:minlen);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?