Matlab 之wavread,audioread,wavwrite,audiowrite函数

wavread - Read WAVE (.wav) sound file

    This MATLAB function loads a WAVE file specified by the string filename,
    returning the sampled data in y.

    y = wavread(filename)
    [y, Fs] = wavread(filename)
    [y, Fs, nbits] = wavread(filename)
    [y, Fs, nbits, opts] = wavread(filename)
    [___] = wavread(filename, N)
    [___] = wavread(filename, [N1 N2])
    [___] = wavread(___, fmt)
    siz = wavread(filename,'size')

audioread - Read audio file

    This MATLAB function reads data from the file named filename, and returns
    sampled data,y, and a sample rate for that data, Fs.

    [y,Fs] = audioread(filename)
    [y,Fs] = audioread(filename,samples)
    [y,Fs] = audioread(___,dataType)

wavwrite - Write WAVE (.wav) sound file

    This MATLAB function writes the data stored in the variable y to a WAVE file
    called filename.

    wavwrite(y,filename)
    wavwrite(y,Fs,filename)
    wavwrite(y,Fs,N,filename)

audiowrite - Write audio file

    This MATLAB function writes a matrix of audio data, y, with sample rate Fs to a
    file called filename.

    audiowrite(filename,y,Fs)
    audiowrite(filename,y,Fs,Name,Value)

[y,Fs] = wavread('ISM.wav');

[y,Fs] = audioread('ISM.wav');
filename = 'ISM.wav';

wavwrite(y,Fs,filename);
audiowrite(filename,y,Fs);

以上是wavwrite函数,audiowrite函数区别

 

  • 5
    点赞
  • 28
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值