CALCULATING THE MEAN OF HOZIRONTAL LINES IN A MATRIX VIA MATLAB

1 visualización (últimos 30 días)
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?

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by