Create preview.m

Added code and comments.