Matlab optical application