-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathplotspectral.m
42 lines (38 loc) · 907 Bytes
/
plotspectral.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
tau=0.5;
T=2000;
tarray=tau:tau:T;
numofz=4;
folderlist=dir('ratio*Lambda1.1BathL*');
n=length(folderlist);
sigmazfinal=zeros(n/numofz,1);
omega=sigmazfinal;
index=1;
for k=1:n
k
sigmaz=0;
m=k;
% for m=k:k+numofz-1
filename=strcat(folderlist(m).name,'/results/sigmaz_t.dat');
if exist(filename)
r=load(filename);
sigmaz=sigmaz+r;
%sscanf(filename,'ratio%g*')
end
% end
omega(index)=sscanf(filename,'ratio%g*');
sigmazlast=sigmaz(end-100:end);
[maxval,maxindex]=max(sigmazlast);
[minval,minindex]=min(sigmazlast);
if maxindex>minindex
a=minindex;b=maxindex;
else
a=maxindex;b=minindex;
end
%sigmazfinal(index)=mean(sigmazlast(a:b));
sigmazfinal(index)=(maxval+minval)/2;
index=index+1;
end
p=(1+sigmazfinal)./2;
p=cat(2,omega,p);
p=sortrows(p);
plot(p(:,1),p(:,2),'-o');