generate a signal of followings notes [240 256 288 320 360 400 450 480hz] with sampling rate of 8000 samples/sec each of duration 2 sec after the delay of 1 sec?
Afficher commentaires plus anciens
Réponses (2)
David Young
le 3 Mar 2011
You can generate a sine wave of given duration, amplitude, frequency and sample rate like this:
duration = 2; % second
samprate = 8000; % Hz
frequency = 240; % Hz
amplitude = 1;
t = 0:1/samprate:duration;
y = amplitude * sin(t * (2 * pi * frequency));
You can concatenate such samples together, along with some stretches of zeros, to get the signal you need.
1 commentaire
ap singh
le 4 Mar 2011
Paulo Silva
le 3 Mar 2011
nice homework and not a single mention of the signal type and amplitude, are you expecting us to do it for you? at least show some effort in solving it, I did the code, choose to do sine waves with aplitude 1 and listened to the signal, here's the output file
load signal
soundsc(signaltotal,8000);
Catégories
En savoir plus sur Signal Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!