Matlab code skeleton