Matlab phase model transformation