Generate sound with specific frequencies
Show older comments
I wanted to make test sound within range of frequencies each freq sound takes 3 seconds. The whole test sond shoud be 42 seconds but when i run it it just plays for 3 seconds. what's the problem with my code ?
amp = 0.5;
Fs = 50 + 100 + 200 + 400 + 1000 + 2000 + 4000 + 6000 + 8000 + 10000 + 12000 + 14000 + 16000 + 18000;
Ts = 1/Fs;
T = 0:Ts:3;
sound(x,Fs)
for freq = [50 100 200 400 1000 2000 4000 6000 8000 10000 12000 14000 16000 18000]
x = amp * sin(2*pi*freq*T);
sound(x,Fs)
end
Accepted Answer
More Answers (0)
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!