how to sum first 140 elements every time in an (1 * 21000) array
Mostra commenti meno recenti
a=rand(1,21000);
how to add (1 to 140,141 to 280, 281 to 420........elements up to 20861 to 21000. and totally i have 21000/140=150 i.e (1row * 150 columns)
and store it in same 'a'
Risposta accettata
Più risposte (1)
JESUS DAVID ARIZA ROYETH
il 19 Nov 2019
solution:
a=rand(1,21000);
b=sum(reshape(a,140,[]));
1 Commento
pavan kumar
il 19 Nov 2019
Categorie
Scopri di più su Vehicle Dynamics Blockset in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!