This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
b:slope_compensation [2022/01/25 17:36] sz |
b:slope_compensation [2022/01/25 17:41] (current) sz |
||
|---|---|---|---|
| Line 23: | Line 23: | ||
| <code mathematica> | <code mathematica> | ||
| - | Clear[x, | + | |
| - | imax=20 | + | Clear[x,y,x1]; |
| - | x2=Table[i, | + | imax=20; |
| + | x2=Table[i/2.,{i,imax}]; | ||
| Print[" | Print[" | ||
| - | a1=1; b1=25; c1=20; | + | a1=1.01; b1=25; c1=10; |
| - | y= Table[a1 Sin[2 Pi .1 x1] + b1 + c1 x1, | + | xy= Table[{x1/2.,a1 Sin[2 Pi .1 x1/2.]+ b1 + c1 x1/2.}, |
| - | Print[" | + | Print[" |
| - | ff=FindFit[y,a Sin[2 Pi .1 x] + b + c x, | + | ff=FindFit[xy,a Sin[2 Pi .1 x] + b + c x,{a,b,c},x]; |
| + | Print[" | ||
| Print[" | Print[" | ||
| - | |||
| x {0.5, | x {0.5, | ||
| + | xy {{0.5, | ||
| + | angles {0.314159, | ||
| + | ff {a-> | ||
| - | xy {{0.5, | ||
| - | |||
| - | angles {0.314159, | ||
| - | ff {a-> | ||
| </ | </ | ||