Feed on
Posts
Comments

save the following code to an m-file and run in matlab to generate some pure tones in wav format.

% pure tones

clear

freqs = 500;
duration = 100;

for i = 1:length(freqs)

sampleFreq = 44100;
dt = 1/sampleFreq;

t = [0:dt:duration];

s=sin(2*pi*freqs(i)*t);
sound(s,sampleFreq);
% wavName = sprintf(’tone%d.wav’,freqs(i));
% wavwrite(s,sampleFreq,16,wavName);

end

Stumble it!

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

Did I get this wrong? Let me know!

Trackback URI | Comments RSS

More blogs about http://desk.stinkpot.org:8080/tricks.