0001 function bbeat=plot_betabeat(THERING_ref,THERING_mod)
0002
0003
0004
0005
0006
0007
0008 indx=1:length(THERING_ref);
0009
0010 if length(THERING_mod) == length(THERING_ref)
0011
0012 Tr=twissring(THERING_ref,0,indx);
0013 Tm=twissring(THERING_mod,0,indx);
0014
0015 br=cat(1,Tr.beta);
0016 bm=cat(1,Tm.beta);
0017
0018 bbeat(1)=plot(findspos(THERING_ref,indx),(bm(:,1)-br(:,1))./br(:,1),'.-b');
0019 hold on;
0020 bbeat(2)=plot(findspos(THERING_ref,indx),(bm(:,2)-br(:,2))./br(:,2),'.-r');
0021
0022 else
0023 error('Not the same lattice');
0024 end
0025
0026 return
0027
0028