1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-15 13:50:38 +02:00

m1rc3/norruption/1/: distribution data and plot script

This commit is contained in:
Werner Almesberger 2011-10-09 22:17:10 -03:00
parent 5037afbe35
commit 8b4ef502d7
2 changed files with 45 additions and 0 deletions

26
m1rc3/norruption/1/GRAPH Normal file
View File

@ -0,0 +1,26 @@
70
613
23
1493
981
517
352
973
233
75
171
162
223
639
117
1584
1121
597
422
1002
260
82
194
168

19
m1rc3/norruption/1/plot Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
gnuplot <<EOF
set term postscript color eps enhanced solid lw 2 20
set output "out.eps"
set title "Probability distribution of time between NOR corruptions"
set xlabel "Power cycles"
set ylabel "Cumulative probability"
set key bottom
plot "< sed '1,/^\$/d' GRAPH | sort -n" using 1:((\$0+1)/12) with lines \
title "First corruption observed", \
"< sed '/^\$/q' GRAPH | sort -n" using 1:((\$0+1)/12) with lines \
title "Last non-corruption observed", \
1-exp(-0.0021*x) with lines \
title "Exponential distribution ({/Symbol l}=1/476)"
EOF
cat out.eps |
gs -sDEVICE=ppmraw -r100 -sOutputFile=- \
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sPAPERSIZE=a4 -q - | \
convert -trim - out.png