Idle Python Code Using Loops In Matlab