Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

How to calculate the average of matrixes with one row?

1 visualizzazione (ultimi 30 giorni)
fathi
fathi il 10 Apr 2017
Chiuso: MATLAB Answer Bot il 20 Ago 2021
Good morning ///// I have 40 matrices, each with one row, each matrix composed of 2400 elements ( numbers ). how can I calculate the average? Element to the corresponding element. the result will be one matrix with 2400 elements. //// thank you///

Risposte (1)

Image Analyst
Image Analyst il 11 Apr 2017
Try this:
% rv = your row vector names
% Concatenate all 40 variables vertically.
matrix2d = [rv1;rv2;rv3;rv4;rv5;............rv39;rv40];
theMeans = mean(matrix2d, 1); % A 1 by 2400 row vector.

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by