Computing the Standard Deviation of Values in a column in Matlab
조회 수: 3 (최근 30일)
이전 댓글 표시
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
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에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!