Averaging the selected vector ranges
Show older comments
Hello! I need to average the values of a vector over 25 values
fr = mean(reshape(VectorTime, 25, [])); %
Error using reshape
Product of known dimensions, 25, not divisible into total number of elements, 523.
Error in TimeAndWordNN (line 1234)
frr = mean(reshape(VectorTime, 25, []));
When I try to make such a variant, I get an error, please help
for i=1:25:length(VectorTime) && i<length(VectorTime)
frr=mean(VectorTime(i:i+1)) % i(1)=1 i(2)=26
end
% tried what i need to do through the loop but nothing worked
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!