Averaging the selected vector ranges
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!