Create calcError.m