フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to calculate the average of matrixes with one row?

2 ビュー (過去 30 日間)
fathi
fathi 2017 年 4 月 10 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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///
  1 件のコメント
Stephen23
Stephen23 2017 年 4 月 11 日
"I have 40 matrices"
Which means you should probably read this:
And next time store your data in one array.

回答 (1 件)

Image Analyst
Image Analyst 2017 年 4 月 11 日
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.

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by