Matlab integration. Added to solution,