![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1231532/image.png)
to change the amplitude of a .wav file
14 次查看(过去 30 天)
显示 更早的评论
I am new to Matlab and im trying to change the amplitude of a .wav file. i have exported the data and Fs. i just dont know how to now increase/decreas the aplitude of the wav.
the code below shows what i have done,
thanks for any advice given.
plot(data);
soundsc(data,fs);
0 个评论
采纳的回答
Image Analyst
2022-12-14
Try multiplying by a scaling factor:
amplificationFactor = 1.1; % Ten percent gain.
data = data * amplificationFactor;
plot(data);
sound(data, fs);
You might be interested in my File Exchange entry that allows you to plot the waveforms of all the files in a folder:
https://www.mathworks.com/matlabcentral/fileexchange/72431-plot-audio-file-waveforms?s_tid=srchtitle
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1231532/image.png)
2 个评论
Image Analyst
2022-12-15
You probably need to square the signal to get power then use the formula here:
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Measurements and Spatial Audio 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!