Calculating Mean Square Error

141 visualizaciones (últimos 30 días)
Maria
Maria el 19 de Abr. de 2014
Comentada: Image Analyst el 28 de Feb. de 2017
What will be the code of the function for calculating Mean Square Error
  3 comentarios
Christy Lentz
Christy Lentz el 27 de Feb. de 2017
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 el 28 de Feb. de 2017
What do you want to do when there's a nan. You know there is a 'omitnans' option to mean() don't you?

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 20 de Abr. de 2014
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 comentarios
Maria
Maria el 21 de Abr. de 2014
Dear Mr Image Analyst many thanks to you , I will try it and feed you back . thanks
Image Analyst
Image Analyst el 9 de Mayo de 2014
Mick, not sure what your recent edit was, but if I helped you could you mark the answer as "Accepted"? Thanks.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Simulation, Tuning, and Visualization en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by