Added an error assessment to the matlab file.