How to operate on each column seperately

1 Ansicht (letzte 30 Tage)
MatlabUser17
MatlabUser17 am 8 Mai 2018
Kommentiert: MatlabUser17 am 8 Mai 2018
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 Kommentare
Guillaume
Guillaume am 8 Mai 2018
rms indeed, if you have the signal processing toolbox.
MatlabUser17
MatlabUser17 am 8 Mai 2018
Thank you guys, I really appreciate it!

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Guillaume
Guillaume am 8 Mai 2018
sqrt(mean(yourmatrix.^2))
is all that is needed. mean operates on columns by default.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by