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:
491 bytes
|
Line | |
---|
1 | % profil de perte |
---|
2 | |
---|
3 | clear |
---|
4 | chambre=10; |
---|
5 | sig=3; |
---|
6 | zb=-2.; |
---|
7 | step=1; |
---|
8 | |
---|
9 | z= -1.5*chambre:step:1.5*chambre; |
---|
10 | ch=min(abs(chambre-z-zb),abs(-chambre-z-zb)); |
---|
11 | for i=1:length(z) |
---|
12 | x=z(i); |
---|
13 | if (x+zb)>chambre |
---|
14 | ch(i)=0; |
---|
15 | elseif (x+zb)<-chambre |
---|
16 | ch(i)=0; |
---|
17 | end |
---|
18 | end |
---|
19 | profil=erf(ch/sqrt(2)/sig); |
---|
20 | |
---|
21 | profil=90*profil+ randn(size(z))*2; |
---|
22 | |
---|
23 | [estimates, model] = fitprofil(z, profil); |
---|
24 | estimates |
---|
25 | [sse, FittedCurve] = model(estimates); |
---|
26 | plot(z, profil, '*', z, FittedCurve, 'r'); |
---|
27 | ylim([0 100]) |
---|
28 | grid on |
---|
29 | |
---|
Note: See
TracBrowser
for help on using the repository browser.