Problem 2. A large set of repeated measurements on the physical property of a physical system. Associated with the analysis and interpretation of the data, two parameters are used:
The arithmetic mean $\bar{x}$
$\bar{x} = \sum x_i / N$
Where N is equal to the total number of measurements. The standard deviation s
$s = \sqrt{(\sum N x_i^2 - (\sum x_i)^2) / N(N-1)}$
All the measurement are either positive or zero. A negative input value will mark the end of the set measurements. Note that if either no numbers or only one number, then an error would be occurred because of dividing by zero. Therefore, the program must abort the program for less than two entries before computing $\bar{x}$ and s.
Write a MATLAB problem to calculate $\bar{x}$ and s.