Werner's Miscellanea
Sign in or create your account | Project List | Help
Werner's Miscellanea Git Source Tree
Root/
| 1 | #!/bin/sh |
| 2 | gnuplot <<EOF |
| 3 | set term postscript color eps enhanced solid lw 2 20 |
| 4 | set output "out.eps" |
| 5 | set title "Probability distribution of time between NOR corruptions" |
| 6 | set xlabel "Power cycles" |
| 7 | set ylabel "Cumulative probability" |
| 8 | set key bottom |
| 9 | plot "< sed '1,/^\$/d' GRAPH | sort -n" using 1:((\$0+1)/12) with lines \ |
| 10 | title "First corruption observed", \ |
| 11 | "< sed '/^\$/q' GRAPH | sort -n" using 1:((\$0+1)/12) with lines \ |
| 12 | title "Last non-corruption observed", \ |
| 13 | 1-exp(-0.0021*x) with lines \ |
| 14 | title "Exponential distribution ({/Symbol l}=1/476)" |
| 15 | EOF |
| 16 | cat out.eps | |
| 17 | gs -sDEVICE=ppmraw -r100 -sOutputFile=- \ |
| 18 | -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sPAPERSIZE=a4 -q - | \ |
| 19 | convert -trim - out.png |
| 20 |
Branches:
master
