Changeset 20936 for trunk/Ohana/src/opihi/cmd.data/test/vmaxwell.sh
- Timestamp:
- Dec 7, 2008, 3:31:01 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.data/test/vmaxwell.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.data/test/vmaxwell.sh
r10069 r20936 40 40 break -auto off 41 41 42 $C0o = 250 43 $C1o = 25 44 $C2o = 100 45 $C3o = 1 46 $C4o = 10 47 42 48 create x 0 1000 1 43 set y = 1000 * (x-200)^2 * exp(-0.5*(x-300)^2/30^2) 44 set dy = (rnd(y) - 0.5)/0.5 49 set y = $C2o * (x-$C4o)^2 * exp(-0.5*(x-$C0o)^2/$C1o^2) + $C3o 50 gaussdev dY y[] 0.0 1.0 51 set dy = dY * sqrt(y) 45 52 set y = y + dy 46 53 47 lim x y; clear; box; plot -x 1 -c black x y 54 $C0 = $C0o + 20 55 $C1 = $C1o + 2 56 $C2 = $C2o + 100 57 $C3 = $C3o + 10 58 $C4 = $C4o + 20 48 59 49 $C0 = 250 50 $C1 = 25 51 $C2 = 900 52 $C3 = 1 53 $C4 = 190 60 vmaxwell -q x y dy yfit 61 lim x y; clear; box; plot -x 1 -c black x y; plot x yfit -c red 54 62 55 vmaxwell x y dy yfit 56 plot x yfit -c red 63 $dS = 6.0 / sqrt(y[]) 57 64 58 if (abs($C0 - 0.0) > 0.01)65 if (abs($C0 - $C0o) > $dS) 59 66 $PASS = 0 60 67 end 61 if (abs($C1 - 3.0) > 0.01)68 if (abs($C1 - $C1o)/$C1o > $dS) 62 69 $PASS = 0 63 70 end 64 if (abs($C2 - 1000.0) > 0.1)71 if (abs($C2 - $C2o)/$C2o > $dS) 65 72 $PASS = 0 66 73 end 67 if (abs($C3 - 0.0) > 0.1) 74 if (abs($C3 - $C3o) > $dS) 75 $PASS = 0 76 end 77 if (abs($C4 - $C4o)/$C4o > $dS) 68 78 $PASS = 0 69 79 end
Note:
See TracChangeset
for help on using the changeset viewer.
