Computing the Standard Deviation of Values in a column in Matlab
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jana Sarran
am 25 Apr. 2023
Kommentiert: Torsten
am 27 Apr. 2023
Say I have the following dataset:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1365814/image.jpeg)
I would like to compute that standard deviation using ONLY SPEED values from ONLY 15 rows at a time in the table shown. How would I go about executing this in Matlab? Is there a specific code that can simplify this task?
2 Kommentare
Dominique Gorissen
am 25 Apr. 2023
I am assuming that you already have this table imported into matlab? If not use the read() command to do so.
Then first convert your desired column into an array and then use std to calculate the standard deviation
SpeedArray=table2array(Table(4,:));
StandardDeviation=std(SpeedArray(1:15));
Akzeptierte Antwort
Dyuman Joshi
am 25 Apr. 2023
out = std(tablename.Speed(1:15))
5 Kommentare
Torsten
am 27 Apr. 2023
Isn't a "moving standard deviation" required, i.e. standard deviation of rows 1-15, 2-16, 3-17 etc ?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!