Take average of 1000 to be 100 values
1 次查看(过去 30 天)
显示 更早的评论
I have some data 1000 value way too big for what I want to see when I plot them. I want to be able to average them into 100 values . Is there any way to do this?
I have been attached the 1000 values as text file.
Thanks
0 个评论
采纳的回答
KSSV
2022-7-20
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1071425/LEARN_users.txt') ;
clc;
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1071425/LEARN_users.txt') ;
A = T.(1) ;
figure(1)
plot(A)
% do averaging
B = reshape(A,[],10) ;
B = mean(B,2) ;
figure(2)
plot(B)
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!