How to implement this formula in MatLab?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Serhii Sheinych
am 25 Nov. 2019
Kommentiert: Serhii Sheinych
am 25 Nov. 2019
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/249988/image.png)
n is a constant = 100
x is an array of 100 rand elements
0 Kommentare
Akzeptierte Antwort
JESUS DAVID ARIZA ROYETH
am 25 Nov. 2019
directly:
n=100;
x=rand(1,n);
s=std(x)
or with a loop:
n=100;
x=rand(1,n);
xmean=mean(x);
sumt=0;
for i=1:n
sumt=sumt+(x(i)-xmean)^2;
end
s=sqrt(sumt/(n-1))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!