Matlab based script