Standard Deviation in MATLAB
Code:
clc
clear all
close all
x=input('Enter the data points:');
a=mean(x);
z=[];
for i=1:length(x)
z=[z (x(i)-a)^2];
end
s=sum(z);
s=s/(length(x)-1);
s=sqrt(s);
clc
clear all
close all
x=input('Enter the data points:');
a=mean(x);
z=[];
for i=1:length(x)
z=[z (x(i)-a)^2];
end
s=sum(z);
s=s/(length(x)-1);
s=sqrt(s);
No comments