Working MATLAB demo