Moving standard Deviation and Average
5 次查看(过去 30 天)
显示 更早的评论
how would I go about finding the moving standard deviation and moving average for every 15 rows of the SPEED COLUMN ONLY in the following matrix and display the results in another table?
0 个评论
采纳的回答
Image Analyst
2023-4-28
If you want to move in "jumps" of 15 rows at a time, then you can either subsample the output of those functions or use blockproc in the Image Processing Toolbox. Or you can use a simple for loop:
% Compute speed over "blocks" of 15 elements
speed = t.Speed; % Get speed values from your table.
index = 1;
for k = 1 : 15 : numel(speed)
meanSpeeds(index) = mean(speed(k : k + 14));
index = index + 1;
end
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!