% plotting and saving script
% requires several input files
addpath('../cwlib')
Imaxs=[];
fname{1}='xA_17_MNI.mat' ;
fname{2}='xB_17_MNI.mat' ;
fname{3}='xC_17_MNI.mat' ;
fname{4}='xAt_17_MNI.mat';
fname{5}='xBt_17_MNI.mat';
fname{6}='xCt_17_MNI.mat';
mstr=cell(0);
mstr{1}='A ';
mstr{2}='B ';
mstr{3}='C ';
mstr{4}='At';
mstr{5}='Bt';
mstr{6}='Ct';
xl{1}='rp';
xl{2}='rm';
xl{3}='sp';
xl{4}='sm';
xl{5}='up';
xl{6}='um';
xl{7}='dp';
xl{8}='dm';
pl{1}='--';
pl{2}='-+';
pl{3}='+-';
pl{4}='++';
xss=cell(0);
xss=cell(0);
pss0=cell(0); % to be edited
pss0=cell(0); % to be edited
for idm=1:6;
Q=load(fname{idm},'Imax');
Imaxs(end+1,:)=Q.Imax;
nt=size(Imaxs,2);
[xs1,ps1]=plotit(fname{idm},idm,xl,pl);
xss{idm}=xs1;
pss{idm}=ps1;
xs1=max(xs1,0);
xs1=min(xs1,1);
ps1=max(ps1,0);
ps1=min(ps1,1);
xss0{idm}=xs1;
pss0{idm}=ps1;
for idt=1:nt;
[vv,dd]=eig(Lmakex(xs1(:,idt)));
[ig,ord]=sort(abs(real(diag(dd))));
pinf=vv(:,ord(1));
pinf=pinf/sum(pinf);
Hs(idm,idt)=H(pinf);
end
hold on
figure(10+idm);
plot(Hs(idm,:),'rx-');
axis tight
end
ts=linspace(.01,2,nt);
figure(1)
plot(Imaxs','.-')
legend(mstr)
save plot_output.mat