CALCULATING THE MEAN OF HOZIRONTAL LINES IN A MATRIX VIA MATLAB

1 visualizzazione (ultimi 30 giorni)
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?

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by