Monday, October 15, 2012

MATLAB - Buzzer

buzzer
% =====================================================================
% MATLAB code to pruduce sound of required frequency
% By Mahesha MG, MIT Manipal
% Date: 15/10/2012
% =====================================================================

Fs=1000;
x=1:2000;
w=600;
y=sin(w*x);
for i=1:5
    sound(y,Fs)
end
plot(y(1:500))

-->

No comments:

Post a Comment