How to operate on each column seperately

3 ビュー (過去 30 日間)
MatlabUser17
MatlabUser17 2018 年 5 月 8 日
コメント済み: MatlabUser17 2018 年 5 月 8 日
Hi, I have a n*m matrix and I need to calculate the RMS value over each column separately. How can I do this without using 'for'? Thanks
  3 件のコメント
Guillaume
Guillaume 2018 年 5 月 8 日
rms indeed, if you have the signal processing toolbox.
MatlabUser17
MatlabUser17 2018 年 5 月 8 日
Thank you guys, I really appreciate it!

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

採用された回答

Guillaume
Guillaume 2018 年 5 月 8 日
sqrt(mean(yourmatrix.^2))
is all that is needed. mean operates on columns by default.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by