FM modulation - all negative values somehow become positive
Afficher commentaires plus anciens
I'm having a weird issue. I'm testing a simple FM modulator - demodulator. I run the code below and this is the graph I get

As you can see all the negative values magically become positive. But I'm really just doing a simple modulation and demodulation. What is the issue here?
Fs = 20e6;
fc=200;(Hz)
fDev = 150000;
t = (0:1/Fs:0.2)';
x = sin(2*pi*30*t)+2*sin(2*pi*60*t);
txsig = fmmod(x,fc,Fs,fDev);
dataOut = fmdemod(txsig,fc,Fs,fDev);
plot(t,x,'c',t,dataOut,'b--');
xlabel('Time (s)')
ylabel('Amplitude')
legend('Original Signal','Demodulated Signal')
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur PHY Components dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
