Square root of the summation(RMS)

조회 수: 14 (최근 30일)
Dinuka Ravimal
Dinuka Ravimal 2020년 11월 17일
댓글: Dinuka Ravimal 2020년 11월 19일
I want to get the results base on the square root of the summation of (square of (height * width).
Example data set ; Height = 40 Width = 0.5
Could you please give me a code for this problem?
  댓글 수: 1
Rik
Rik 2020년 11월 17일
This is not the conventional meaning of RMS, which is the square Root of the Mean of the Squares. Also, this is a pretty basic calculation, what have you tried already? Since your example data has only scalar values, it seems strange to ask for a sum. What is the sum of a single value?

댓글을 달려면 로그인하십시오.

채택된 답변

VBBV
VBBV 2020년 11월 17일
편집: VBBV 2020년 11월 19일
height = 40:60;
width= linspace(0.2,0.5,length(height));
sqrt(sum((height.*width).^2))
  댓글 수: 2
Rik
Rik 2020년 11월 17일
Why use length, instead of numel? And why do you not store the result of the third line of code in a variable?
Dinuka Ravimal
Dinuka Ravimal 2020년 11월 19일
Thank you Vasistha.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by