필터 지우기
필터 지우기

to change the amplitude of a .wav file

조회 수: 13 (최근 30일)
Femi Okome
Femi Okome 2022년 12월 14일
댓글: Image Analyst 2022년 12월 15일
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);

채택된 답변

Image Analyst
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:
  댓글 수: 2
Femi Okome
Femi Okome 2022년 12월 14일
thank you very much. that now works and i can also see the gain change on the graph. one more thing, what would be the best way to calculate the plot value in dB.
Image Analyst
Image Analyst 2022년 12월 15일
You probably need to square the signal to get power then use the formula here:

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Measurements and Spatial Audio에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by