plot range of freq on unit circle
7 views (last 30 days)
Show older comments
Hi
I want to plot a range of freq 10 k to 1 M Hz on unit circle
How can I do that
best regards
Uzmeed
1 Comment
Dyuman Joshi
on 27 Jan 2024
I am not sure what you want to do but check out the 4th syntax in the description of freqz
Answers (1)
Vedant Shah
on 5 Mar 2025
Edited: Vedant Shah
on 5 Mar 2025
To plot frequencies ranging from 10 kHz to 1 MHz on a unit circle, we can follow the below approach. Assuming the total number of points as 100000, we create a vector of frequencies using the “linspace” function, which allows us to generate evenly spaced points between the specified minimum and maximum frequencies.
Next, we calculate the angular frequency using the formula
Omega = 2*pi*f
where Omega represents the angular frequency. Since we are plotting these frequencies on the unit circle, it is essential to normalize them by dividing by the maximum frequency in our range.
Following this, we compute the complex numbers using Euler's formula,
z = e^{j*theta}
where theta is the normalized angular frequency. These complex numbers represent points on the unit circle.
Finally, we plot these points using “plot” function, allowing to visualize the distribution of frequencies around the unit circle.
Here is an example code snippet for reference:
f_min = 10e3;
f_max = 1e6;
num_points = 100000;
% Vector of frequencies
frequencies = linspace(f_min, f_max, num_points);
% Frequencies mapped to the unit circle
Omega = 2*pi* frequencies;
theta = Omega / f_max; % Normalize with respect to the max frequency
z = exp(1i * theta); % Complex numbers on the unit circle
% Plot the unit circle
figure;
plot(real(z), imag(z), 'b.');
xlabel('Real Part');
ylabel('Imaginary Part');
title('Frequencies on the Unit Circle');
axis equal;
grid on;
Using this code, we get the following unit circle as our output:

For more information you can refer to the following documentations:
0 Comments
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!