I have a my_file.xvg contained 240 lines with the numbers arranged in the following format:
5.4
5.1
5.2
5.4
5.4
4.9
5.0
5.2
....
4.9
Using awk I have already calculated the mean value of these data and store it as a "mean" variable in the bash script:
mean=$(awk '{sum+=$1}END{printf "%.1f", sum/NR}' my_file.xvg)
How could I calculate RMSD of these numbers (to determine error of the mean for instance) and store it as the another variable?
question from:https://stackoverflow.com/questions/66047971/bash-calculation-of-the-rmsd-from-the-dataset