clear "[filename, pathname] = uigetfile('*.*', 'EMG file');" cd(pathname) a=load(filename); pause "%assume we get 1 sec of data, if sampling frequency =1000 then window size=1000" windowsize=1024; ii = 1:windowsize ; "[r,c]=size(a);" "x=a(:,1);" % use the hanning window windowfr=hanning(windowsize); % perform the short time Fourier Transform. Also caluclate the median frequency k=0; iii=k*windowsize+ii; while (k*windowsize+11)