% Define a time axis, duration 2 seconds, sampling rate 8192 Hz
t=0:1/8192:2;
% 500 Hz tone
sig = cos(2*pi*500*t);
plot(t(1:100),sig(1:100))
grid
xlabel('Time (seconds)')
ylabel('Amplitude')
title('y=cos(2\pi 500Hz t)')
disp('Press Enter for sound')
pause
sound(sig)
disp('Press enter for next signal');
pause
% 500 Hz tone, amplitude 0.25
sig = 0.25*cos(2*pi*500*t);
plot(t(1:100),sig(1:100))
grid
xlabel('Time (seconds)')
ylabel('Amplitude')
title('y=0.25*cos(2\pi 500Hz t)')
disp('Press Enter for sound')
pause
sound(sig)
disp('Press enter for next signal');
pause
% 500 Hz tone, amplitude 1, phase pi/2
sig = cos(2*pi*500*t + pi/2);
plot(t(1:100),sig(1:100))
grid
xlabel('Time (seconds)')
ylabel('Amplitude')
title('y=cos(2\pi 500Hz t + \pi/2)')
disp('Press Enter for sound')
pause
sound(sig)
disp('Press enter for next signal');
pause
% 1000 Hz tone, amplitude 1, 
sig = cos(2*pi*1000*t);
plot(t(1:100),sig(1:100))
grid
xlabel('Time (seconds)')
ylabel('Amplitude')
title('y=cos(2\pi 1000Hz t)')
disp('Press Enter for sound')
pause
sound(sig)
%disp('Press enter for next signal');
%pause

