MatLab 3 Write a function to calculate the standard deviatio
MatLab
3. Write a function to calculate the standard deviation of a vector, where x, is the i-th element of the vector, x is the average of the vector n i lSolution
Function y=stddeviation(x)
n=length(x);
av=sum(x)/n;
for I=1:1:n
X(i)=(x(i)-av).^2;
X(i)=x(i)/n;
y=sqrt(sum(x));
end

