The magnitude and phase spectra are calculated from the complex output Xf using abs(Xf) and angle(Xf), respectively (see Example 3.3). Again, the angle routine gives phase in radians so as to convert to the more commonly used degrees scale by 360/(2π).