You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
359 B
13 lines
359 B
function flatSound |
|
% written by CPF |
|
|
|
Nsecs = 1; %number of seconds |
|
delta_t = 1/4096; |
|
t = 0:delta_t:(Nsecs-delta_t); |
|
|
|
Fs=4096; % sampling frequency |
|
freq = 400 ; % frequency of the sound |
|
A = 0.6;% amplitud of the sound (between 1 and -1 so it can be played by 'sound' function of Matlab |
|
y = A*sin(2*pi*freq*t); % build the intensities over time |
|
sound(y,Fs) |
|
end |