Matlab changes and edits