about sampling frequency I am trying to make a DFT on a signal with frequency f=50 MHz main component plus some noise.
As far as I know if I sample it at F=100MHz I should be able to get a proper plot of the DFT since F=2f and I should see a peak at 50MHz, this instead does not happen,see first figure.

But instead I obtain what expected when I am leaving unchanged all parameters of DFT (sampling period and number of samples) but halving the signal frequency to f=25MHz, see second figure


Can anyone explain to me why this happens? From Nyquist theorem I should be able to see the 50MHz component if sampling at 100MHz

Thanks for helping
The second plot is correct, 25 MHz tone where you halved your input frequency to 25 MHz. I suspect that you may be sampling synchronously a real signal such that the samples are all landing close to the zero crossings (noticing the dB scale on the horizontal axis on the first plot that there is minimum signal content in your FFT). If this was done with complex sampling the tone would always show up somewhere in the digital domain from 0 to $F_s$. But with real sampling we can get a null at $F_s/2$ as you are seeing with synchronous sampling at or close to the zero crossings.