在Matlab中以矩阵形式访问音频文件

在Matlab中以矩阵形式访问音频文件,matlab,audio,matrix,signal-processing,audio-processing,Matlab,Audio,Matrix,Signal Processing,Audio Processing,我对MATLAB是新手。 我已经在其中编写了以下代码 load handel.mat ; filename = 'handel.wav'; audiowrite(filename,y,Fs); disp('playing for a second') ; samples = [20*Fs,21*Fs]; [y,Fs] = audioread('handle.mp3',samples); sound(y,Fs); disp('saving this output sound') ; filenam

我对MATLAB是新手。 我已经在其中编写了以下代码

load handel.mat ;
filename = 'handel.wav';
audiowrite(filename,y,Fs);
disp('playing for a second') ;
samples = [20*Fs,21*Fs];
[y,Fs] = audioread('handle.mp3',samples);
sound(y,Fs);
disp('saving this output sound') ;
filename = 'handel.wav';
audiowrite(filename,y,Fs);
info = audioinfo('handel.wav') 
disp('ploting the graph') ;
[f,Fs] = audioread('handel.wav') ;
N = length(f);
slength = N/Fs;
t = linspace(0, N/Fs, N)
plot(t, f)
clear y Fs
此代码读取mp3音频文件,将其保存为.wav并将其绘制为图形。当我运行命令窗口时,它还会在命令窗口中显示一些列值。 我想做的是将音频文件作为矩阵进行操作。但我不知道如何获得矩阵形式的音频。请帮我做这件事。

当你做的时候,它会回来

  • y:作为矩阵的音频数据
  • Fs:采样频率

所以,你的好去处

谢谢你的帮助!谢谢你的帮助!