How to operate on each column seperately

1 vue (au cours des 30 derniers jours)
MatlabUser17
MatlabUser17 le 8 Mai 2018
Commenté : MatlabUser17 le 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 commentaires
Guillaume
Guillaume le 8 Mai 2018
rms indeed, if you have the signal processing toolbox.
MatlabUser17
MatlabUser17 le 8 Mai 2018
Thank you guys, I really appreciate it!

Connectez-vous pour commenter.

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Operators and Elementary Operations dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by