How to count average value from each row of matrix?

1 Ansicht (letzte 30 Tage)
Isti
Isti am 3 Mai 2012
I have a matrix A like this:
A
2 1 4
4 7 6
9 1 2
7 5 4
Then, i wanto to count average value from each row. so the result will be vector Y like this: Y:
2.3
5.6
4.0
5.3
What to do? Thanks before :')

Akzeptierte Antwort

Junaid
Junaid am 3 Mai 2012
mean(A, 2)
will you average by row.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB 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!

Translated by