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

📄 readsounds.m

📁 这是盲信号的代码 都已经通过编译了 做这方面的同仁可以参考一下 我觉得蛮惯用的
💻 M
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -