max freq = 1/2; %maximum frequency freq = (1: n/2 ) / (n/2) *maxfreq; %equally spaced frequency grid and how it can be calculated for other examples? is there a general equation or formula to calculate it?
Kshitij Singh answered .
2025-11-20
If n is even, the following is equivalent to your code:
f = linspace(2/n, 1, n/2) * maxfreq;