Sum of all odd and even arrays in matrix
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Suppose I have a matrix a:
a = [2,3;1,2;1,2;0,1;1,2;3,1;1,3;2,1;2,3;3,1];
I want to build matrix b with dimension 2*2 that first row is sum up of all odd rows of matrix a and second rwo is sum up of all even rows of matrix a
b = [16;19]
2 Kommentare
Image Analyst
am 29 Okt. 2014
OK, suppose you do. Is this homework? This is very very simple. What have you tried?
the cyclist
am 29 Okt. 2014
Here is a hint. Do you know how to make a vector of odd numbers? Even numbers?
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!