My time-domain sampling rate of IQ data is Fs. Matlab FFT assumes spectral bandwidth is Fs/2, per the Nyquist criterion. I understand that IQ data has bandwidth of Fs. How do I do FFT of such IQ data and get bandwidth of Fs?
For strictly real data (imaginary components all zero), if you only look in the first half of an FFT result (N/2 result bins for an FFT of length N) you only see Fs/2 bandwidth. The second half of that FFT result is just a redundant conjugate mirror of the first half given strictly real input.
But for complex input or IQ sampled input, the 2nd half of the FFT result is not just a conjugate mirror of the first half, but represents an independant negative spectrum, of bandwidth Fs/2. Total bandwidth of both halves of the complex input FFT being Fs/2 + Fs/2 = Fs (minus the roll-off or transition region of any anti-aliasing filter before IQ sampling).
For direct conversion from f0 to baseband IQ (say using a Tayloe mixer or other quadrature heterodyne) sampled at Fs (then doing an FFT on the IQ result), the spectrum from f0-Fs/2 to f0 is in FFT result bins N/2 to N-1 plus bin 0, and the spectrum f0 to f0+fs/2 is in FFT result bins 0 to N/2.
The Nyquist criterion is sort of met because an IQ sample vector really contains twice as many samples (real components plus quadrature components), thus providing twice the bandwidth. But a complex vector can use the same length of a complex FFT as a strictly real vector of the same time duration. So conflating the FFT length with the number of real samples or complex samples or components of complex samples can be confusing.