matlab runs entire program and plots data