Find a mean square root velocity of each row in matrix

1 回表示 (過去 30 日間)
Ali Kareem
Ali Kareem 2015 年 10 月 23 日
コメント済み: Star Strider 2015 年 10 月 23 日
I have A 100 by 20 matrix and I want to find a mean square root velocity of each row and divided by a constant C then return the result as a 100 by 1.
Can you help me?
Thank you

採用された回答

Star Strider
Star Strider 2015 年 10 月 23 日
The rms function is in the Signal Processing Toolbox. This uses built-in MATLAB funcitons:
V = randi(99, 100, 20); % Create Data
C = 100; % Define Constant ‘C’
VrmsC = sqrt(mean(V.^2,2))/C; % RMS Velocity/C
  2 件のコメント
Ali Kareem
Ali Kareem 2015 年 10 月 23 日
Hi, Thank you for your reply. Please I have data saved in matrix A(100,20) Code will be VrmsC = sqrt(mean(A.^2,2))/C Is that correct? Thanks
Star Strider
Star Strider 2015 年 10 月 23 日
My pleasure.
That is correct, if ‘C’ is a scalar constant.

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

その他の回答 (1 件)

dpb
dpb 2015 年 10 月 23 日
v=rms(x,2)/C; % presuming one C; if per row, the define the column vector and use "./C"
doc rms % for details

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by