How to calculate mean across the elements of a cell?

4 ビュー (過去 30 日間)
Tomaszzz
Tomaszzz 2022 年 2 月 21 日
コメント済み: Jan 2022 年 2 月 22 日
I have a 7 x 1 cell(attached) with elements in the following dimensions
I want to calcuate the mean across seven rows so my output will be one row of dimension 100x1. Can you help please?

採用された回答

Jan
Jan 2022 年 2 月 21 日
編集済み: Jan 2022 年 2 月 21 日
Cells are a really bad way to store data, if you want to perform calculations with them. Simply convert them to a numerical array:
data = cat(2, YourCell{:});
result = mean(data, 2); % Now it's easy
  4 件のコメント
Tomaszzz
Tomaszzz 2022 年 2 月 22 日
Hi Jan. Yes, I deleted it. I typed 'filter' instead of 'filtfilt' and changing it solved the issue. What you say, is the second mistake I realized there was. Apologies for deleting the question too early.
Jan
Jan 2022 年 2 月 22 日
Okay. Thanks for the explanation.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by