Calculating rms for a matrix

4 次查看(过去 30 天)
Faiz Khan
Faiz Khan 2020-4-24
评论: Faiz Khan 2020-4-28
I have a matrix (21*394) and i need to find a rms for it. i am getting a matrix as a coloumn matrix but i need a row matrix.How can i do that

回答(2 个)

Adam Danz
Adam Danz 2020-4-24
Check out the 2nd input to, y = rms(x,dim)
  3 个评论
Faiz Khan
Faiz Khan 2020-4-24
could you explain me in detail
Adam Danz
Adam Danz 2020-4-24
编辑:Adam Danz 2020-4-28
Click the link in my answer. Read about 'dim' (link below takes you directly to "dim").
Dim specifies which dimension (columns, rows, etc.) Try dim=1 and dim=2 to see what it does.

请先登录,再进行评论。


David Hill
David Hill 2020-4-28
If you have the signal processing toolbox, it is as easy as:
y=rms(x,2);
If you don't, you can calculate manually.
y=sqrt(sum(x.^2,2)/size(x,2));

类别

Help CenterFile Exchange 中查找有关 Array and Matrix Mathematics 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by