How can I calculate vector relative errors in percent?
Mostrar comentarios más antiguos
I have to calculated for each vector sample mean ms and variance vs and for
each calculated ms and vs calculate their relative errors in percent. How can I calculate their relative errors in percent?
It would be great if somebody give some examples.
Respuesta aceptada
Más respuestas (1)
x = rand(100,1);
ms = mean(x);
vs = var(x);
relative_error_ms_in_percent = abs(ms-0.5)/0.5 * 100
relative_error_vs_in_percent = abs(vs-1/12)/(1/12) * 100
1 comentario
Ihor
el 4 de Dic. de 2022
Categorías
Más información sobre Correlation and Convolution en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!