Dear people,
I am trying to write an audio with the following lines. However, every after I write an audio into a file and play it, they sound the same no matter what the sampling frequency is.
clear allclcFrequencySampling = 2500; % 2500 for safe 10000 for shock
duration =17;repeats=1;t = linspace(0, duration, FrequencySampling*duration+1); % Time Vector + 1 sample
t(end) = []; % remove extra sample
w = 2*pi*1000; % Radian Value To Create 1kHz Tone
for i=1:repeats s = sin(w*t); sound(s,FrequencySampling); pause(5) %ITI 60 sec
endaudiowrite('shock.wav',s,FrequencySampling);
Please recommend me any possible reasons or let me know if I have done sth wrong.
Best Answer