필터 지우기
필터 지우기

generation of sound wave

조회 수: 9 (최근 30일)
N/A
N/A 2019년 2월 12일
댓글: Star Strider 2019년 2월 12일
how can i generate a sound wave through matlab?

채택된 답변

Star Strider
Star Strider 2019년 2월 12일
Fs = 4.41E+4;
t = linspace(0, Fs*5, Fs*5);
f1 = 1E+3;
f2 = 1E+1;
s = sin(2*pi*f1*t/Fs) .* cos(2*pi*f2*t/(5*Fs));
sound(s, Fs)
Experiment to get the result you want.
  댓글 수: 2
N/A
N/A 2019년 2월 12일
actually i want a graph generated with many peaks and valleys
Star Strider
Star Strider 2019년 2월 12일
Adding a plot call to my previous code (and changing the modulating signal a bit):
Fs = 4.41E+4;
t = linspace(0, Fs*5, Fs*5);
f1 = 1E+3;
f2 = 1E+1;
s = sin(2*pi*f1*t/Fs) .* cos(2*pi*f2*t/(10*Fs));
sound(s, Fs)
figure
plot(t, s)
grid
Experiment to get the result you want.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by