Computing the Standard Deviation of Values in a column in Matlab
6 次查看(过去 30 天)
显示 更早的评论
Say I have the following dataset:
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 个评论
Dominique Gorissen
2023-4-25
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));
采纳的回答
Dyuman Joshi
2023-4-25
out = std(tablename.Speed(1:15))
5 个评论
Torsten
2023-4-27
Isn't a "moving standard deviation" required, i.e. standard deviation of rows 1-15, 2-16, 3-17 etc ?
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!