added gen error and display to experiment.m