Root mean square calculations

조회 수: 2 (최근 30일)
Stefan
Stefan 2014년 8월 2일
댓글: Image Analyst 2014년 8월 2일
Hello,
I want to calculate the sqaure root of the mean sqaured differences of succesisve numbers. Can anyone explain of how to calculate this in matlab if possible with an example for a set of numbers.
thanks.

채택된 답변

Image Analyst
Image Analyst 2014년 8월 2일
Stefan, what happened when you tried this:
m = sort(rand(1, 7)); % create sample data
mDiff = diff(m)
meanSquareOfDiffs = mean(mDiff .^ 2)
ms = sqrt(meanSquareOfDiffs)
It seems pretty easy if you just take it a step at a dime. Heck, you could even have used a for loop if you really got stuck and needed a simple brute force method. What did you try that didn't work?
  댓글 수: 1
Image Analyst
Image Analyst 2014년 8월 2일
By the way, this (what you described) is not the RMS like you or someone tagged this post with.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by