MATLAB sound generation with increased dB-value
问题 This may look like an easy question for some of you, but I'm not very familiar with signal processing, and I'd rather be sure about this. So I've found some easy code to generate a pure tone in MATLAB: Fs = 44100; duration = 5.0; numberOfSamples = Fs * duration; samples = (1:numberOfSamples) / Fs; s = sin(2 * pi * freq * samples); sound(s, Fs); I'd like to be able to adjust the volume in terms of dB here. More precisely, I want to introduce a certain parameter, say dbOffset , which, after