CALCULATING THE MEAN OF HOZIRONTAL LINES IN A MATRIX VIA MATLAB

1 view (last 30 days)
Hello,
I have a question about a code. I have created via some commands a table (double matrix) with 20 lines and 50 columns. I would like to use the command mean in order to calculate the mean of all the values of each line one by one. I mean finally I would like to have 20 values. I think i should use a loop , but i am not sure. Could anyone help me?

Accepted Answer

Andrei Bobrov
Andrei Bobrov on 29 Nov 2019
out = mean(A,2) % here A - your array 20 x 50

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!