Plotting radians with freqz fucntion

I'm currently using the freqz function to plot the magnitude and phase of a transfer function, but my frequencies won't show up in radians.
Yz = [1 1];
Xz = [1 -0.9 0.81];
freqz(Yz,Xz,256,2000);
I'm just trying out different codes from MATLAB examples, but these values are just returning true frequencies. How do I get the plots into radians?

Answers (1)

The last argument in the freqz call is the sampling frequency. Here, you’re telling it your sampling frequency is 2 kHz, so it will scale the frequency vector to the Nyquist frequency, here from 0 to 1 kHz.
If you want it normlised in radian frequency measure, delete the sampling frequency argument:
Yz = [1 1];
Xz = [1 -0.9 0.81];
freqz(Yz,Xz,256);

Asked:

on 10 May 2016

Answered:

on 10 May 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!