function find_muscles(path1,methods,speed)

load ~/Documents/MATLAB/data/Perry_muscles/stim_act;

addpath '~/Dropbox/harvard/processMOT/';  

for i = 1:length(methods)
  infile1 = ['~/Documents/MATLAB/data/' path1 '/processed/EMG/avg_act_thresh'];
  infile1 = [infile1 '/' methods{i} '/' speed '.mat']; 

  eval(['load ' infile1]);

  % Compute cross correlations

  [valTA, indTA]    = max(xcorr(m_sTA,p_sTA,'coeff')); 
  [valSOL,indSOL]   = max(xcorr(m_sSOL,p_sSOL,'coeff')); 
  [valGAS,indGAS]   = max(xcorr(m_sGAS,p_sGAS,'coeff'));   
  [valVAS,indVAS]   = max(xcorr(m_sVAS,p_sVLAT,'coeff'));   
  [valBFSH,indBFSH] = max(xcorr(m_sBFSH,p_sBFSH,'coeff'));   
  [valRF,indRF]     = max(xcorr(m_sRF,p_sRF,'coeff'));     
  [valHAM,indHAM]   = max(xcorr(m_sHAM,p_sSMEM,'coeff'));     
  [valILL,indILL]   = max(xcorr(m_sILL,p_sILL,'coeff'));   
  [valGLU,indGLU]   = max(xcorr(m_sGLU,p_sGLU_low,'coeff'));   
  [valHAB,indHAB]   = max(xcorr(m_sHAB,p_sGMED,'coeff'));   
  [valADDL,indADDL] = max(xcorr(m_sADDL,p_sAL,'coeff'));   
  [valADDM,indADDM] = max(xcorr(m_sADDM,p_sAM,'coeff'));     
  keyboard

  
  eval(['x_' methods{i} '.xTA  = max(xcorr(m_sTA,p_sTA,''coeff''));']); 
  eval(['x_' methods{i} '.xSOL = max(xcorr(m_sSOL,p_sSOL,''coeff''));']); 
  eval(['x_' methods{i} '.xGAS = max(xcorr(m_sGAS,p_sGAS,''coeff''));']);   
  eval(['x_' methods{i} '.xVAS = max(xcorr(m_sVAS,p_sVLAT,''coeff''));']);   
  eval(['x_' methods{i} '.xBFSH = max(xcorr(m_sBFSH,p_sBFSH,''coeff''));']);   
  eval(['x_' methods{i} '.xRF = max(xcorr(m_sRF,p_sRF,''coeff''));']);     
  eval(['x_' methods{i} '.xHAM = max(xcorr(m_sHAM,p_sSMEM,''coeff''));']);     
  eval(['x_' methods{i} '.xILL = max(xcorr(m_sILL,p_sILL,''coeff''));']);   
  eval(['x_' methods{i} '.xGLU = max(xcorr(m_sGLU,p_sGLU_low,''coeff''));']);   
  eval(['x_' methods{i} '.xHAB = max(xcorr(m_sHAB,p_sGMED,''coeff''));']);   
  eval(['x_' methods{i} '.xADDL = max(xcorr(m_sADDL,p_sAL,''coeff''));']);   
  eval(['x_' methods{i} '.xADDM = max(xcorr(m_sADDM,p_sAM,''coeff''));']);     
end;
keyboard