1.0

1.0 | 1 rating Rate this file 23 Downloads (last 30 days) File Size: 1.16 KB File ID: #33595

Code for calculating root mean squared error for data

by Kamlesh Pawar

 

03 Nov 2011 (Updated 01 Jul 2013)

This is a simple code which accurately calculates RMS error for real or complex data.

| Watch this File

File Information
Description

er = rms_error(A1,A2)

here A1, A2 are original and reconstructed data. The order of A1,A2 doesn't matter, interchanging them will also give same result.

Required Products MATLAB
MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
image processing, signal processing
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
08 Dec 2011 Michael Völker

MATLAB = MATrix LABoratory

er = A1 - A2;
er = sqrt( (er(:)' * er(:)) / length(er(:)) );

Advantages: faster, shorter, works with arbitrarily sized A1/A2, works with complex data, too.

Updates
18 Dec 2011

for loops were eliminated for fast implementation.

01 Jul 2013

No update in the code, only changed the description of code

Contact us