Matlab angle arcing program