Calculating Mean Square Error

조회 수: 99 (최근 30일)
Maria
Maria 2014년 4월 19일
댓글: Image Analyst 2017년 2월 28일
What will be the code of the function for calculating Mean Square Error
  댓글 수: 3
Christy Lentz
Christy Lentz 2017년 2월 27일
What happens when the returned value is NaN? I'm using 2 arrays of observational measurements and then simulation measurements and trying to find the MSE, but upon using this algorithm I get a NaN back.
Image Analyst
Image Analyst 2017년 2월 28일
What do you want to do when there's a nan. You know there is a 'omitnans' option to mean() don't you?

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

채택된 답변

Image Analyst
Image Analyst 2014년 4월 20일
OK so we know the desired signal, at least you could if you made up the equation for it. But what is the actual signal? Do you have that in some array, perhaps that you read in from some kind of position sensor or image analysis? To calculate MSE you need to have two signals - the desired/true signal, and your actual/test signal. Then just do
MSE = mean((desired - mean).^2);
  댓글 수: 5
Maria
Maria 2014년 4월 21일
Dear Mr Image Analyst many thanks to you , I will try it and feed you back . thanks
Image Analyst
Image Analyst 2014년 5월 9일
Mick, not sure what your recent edit was, but if I helped you could you mark the answer as "Accepted"? Thanks.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Hilbert and Walsh-Hadamard Transforms에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by