Last change
on this file since 4 was
4,
checked in by zhangj, 11 years ago
|
Initial import--MML version from SOLEIL@2013
|
File size:
1008 bytes
|
Line | |
---|
1 | function [X,Z]=toto(num) |
---|
2 | |
---|
3 | filename=['../bpm/bpmdata/bpm_' num2str(num)]; |
---|
4 | load(filename,'X', 'Z', 'Q', 'Sum', 'Va', 'Vb', 'Vc', 'Vd'); |
---|
5 | X; |
---|
6 | end |
---|
7 | % istart = 1; |
---|
8 | % iend = 500; |
---|
9 | % ifft=256; |
---|
10 | |
---|
11 | % xm=0; |
---|
12 | % zm=0; |
---|
13 | % j=0; |
---|
14 | % for i=istart:iend, |
---|
15 | % xm=xm+X(i); |
---|
16 | % zm=zm+Z(i); |
---|
17 | % j=j+1; |
---|
18 | % tx(j)=X(i); |
---|
19 | % tz(j)=Z(i); |
---|
20 | % end |
---|
21 | % xm=xm/(iend-istart); |
---|
22 | % zm=zm/(iend-istart) |
---|
23 | % fx=fft(tx,ifft);px=fx.*conj(fx)/ifft; |
---|
24 | % fz=fft(tz,ifft);pz=fz.*conj(fz)/ifft; |
---|
25 | % f = (0:ifft/2)/ifft; |
---|
26 | |
---|
27 | % figure(1) |
---|
28 | % subplot(3,2,1) |
---|
29 | % plot(X(istart:iend)) |
---|
30 | % ylabel('X') |
---|
31 | % grid on |
---|
32 | % subplot(3,2,2) |
---|
33 | % plot(Z(istart:iend)) |
---|
34 | % ylabel('Z') |
---|
35 | % grid on |
---|
36 | % |
---|
37 | % subplot(3,2,3) |
---|
38 | % plot(f(2:ifft/2),px(2:ifft/2)) |
---|
39 | % xlim([0 0.15]) |
---|
40 | % ylabel('TX') |
---|
41 | % grid on |
---|
42 | % subplot(3,2,4) |
---|
43 | % plot(f(2:ifft/2),pz(2:ifft/2)) |
---|
44 | % xlim([0 0.15]) |
---|
45 | % ylabel('TZ') |
---|
46 | % grid on |
---|
47 | % |
---|
48 | % subplot(3,2,5) |
---|
49 | % plot(Sum(istart:iend)) |
---|
50 | % ylabel('SUM') |
---|
51 | % grid on |
---|
52 | % subplot(3,2,6) |
---|
53 | % plot(Q(istart:iend)) |
---|
54 | % ylabel('TX') |
---|
55 | % grid on |
---|
56 | % suptitle(['BPM' num2str(num) ' Xmoy=' num2str(xm) ' Zmoy=' num2str(zm)]); |
---|
Note: See
TracBrowser
for help on using the repository browser.