Calculating rms for a matrix

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

3 件のコメント

David Hill
David Hill 2020 年 4 月 24 日
Do you need the rms for each column or for each row?
Faiz Khan
Faiz Khan 2020 年 4 月 24 日
For each row
Faiz Khan
Faiz Khan 2020 年 4 月 24 日
Can un pls respond how should i do that

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

回答 (2 件)

Adam Danz
Adam Danz 2020 年 4 月 24 日

0 投票

Check out the 2nd input to, y = rms(x,dim)

3 件のコメント

Faiz Khan
Faiz Khan 2020 年 4 月 24 日
WHAT SHOULD BE DIM
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 日

0 投票

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));

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

質問済み:

2020 年 4 月 24 日

コメント済み:

2020 年 4 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by