
function plotsig(x,fs)
%   plotsig(x,fs)
% is for investigating signals.
% fs is the sample rate
	xx=x;
    M=750;
    if length(xx)<M
        M=length(xx);
    end
    % We only want to investigate the begining
    % parts of the signals in Lab 5, so we
    % are now limiting M to 750.
	subplot(2,1,1)
	t=(1/fs)*[0:M-1];
	plot(t,xx(1:M),'g')
	mx=1.2*max(abs(x));axis([0 M/fs -mx mx]);
	xlabel('time in seconds')
	title('time snapshot')
	subplot(2,1,2)
	spectrm(x,fs)
    title('spectrum')
    sc=max(x);
	sound(x/sc,fs)
		
