Matlab interfacing for testing purposes