%   ReadFittedResponse.m

%   This software is protected by german copyright and international treaties.             
%   Copyright 2004 Markus Junghöfer & Peter Peyk. All Rights Reserved.                     
%                                                                                          
%   THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE        
%   NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,    
%   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE    
%   OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
%   TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT,       
%   INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE      
%   OR DOCUMENTATION.

MalePath='D:\ValAro\00_Plot\Male'
MaleFile='Male_AntCingulum_Center_0_42_2.txt'

FemalePath='D:\ValAro\00_Plot\Female'
FemaleFile='Female_AntCingulum_Center_0_42_2.txt'
                                                                      

MaleFilePath=[MalePath,filesep,MaleFile]
FemaleFilePath=[FemalePath,filesep,FemaleFile]

Malefid=fopen(MaleFilePath,'r');
Hdr=fgetl(Malefid)
MaleMat=zeros(234,6);
for i=1:234
    MaleMat(i,:)=fscanf(Malefid,'%g',6)';
end
fclose(Malefid)
[MaxMat,MaxMatIn]=max(MaleMat)
MaleMaxMat=MaxMat(2:6)
Femalefid=fopen(FemaleFilePath,'r');
Hdr=fgetl(Femalefid)
FemaleMat=zeros(234,6);
for i=1:234
    FemaleMat(i,:)=fscanf(Femalefid,'%g',6)';
end
fclose(Femalefid)
[MaxMat,MaxMatIn]=max(FemaleMat)
FemaleMaxMat=MaxMat(2:6)
   
