How can I plot a message signal?

17 ビュー (過去 30 日間)
Dimitrios Kyriakidis
Dimitrios Kyriakidis 2023 年 6 月 1 日
I want to plot the message m(t) signal from a AM signal. The carrier frequency is fc=522Hz. How can I code this so that the plot is the message signal?

採用された回答

Rahul
Rahul 2023 年 6 月 2 日
編集済み: Rahul 2023 年 6 月 2 日
Hi Dimitrios,
Assuming a general Sideband-Suppressed modulation case, we can take a case of modulating a simple sine wave message signal of frequency fm (say 0.2*fc < fc) and an amplitude of 5, along with a sampling rate fs (> 2*fc : Nyquist Condition), we can plot each of the message, modulated and demodulated signals using the following snippet:
% Carrier Frequency
fc = 522;
% Sampling Frequency (> 2*fc)
fs = 100*fc;
% Message Signal Frequency
fm = 0.2*fc;
% Time Frame : 0 to 0.01 (s)
t = (0:(1/fs):0.02);
% Original Message Signal m(t)
m = 5*sin(2*pi*fm*t);
% Amplitude Modulated Signal
y_am = ammod(m, fc, fs);
% Amplitude Demodulated Signal
y_m = amdemod(y_am, fc, fs);
% Plotting each signal
plot(t, m)
hold on
plot(t, y_am)
plot(t, y_m, "o-")
hold off
legend(["Original Signal" "Amplitude Modulated Signal" "Demodulated Signal"]);
You can refer to the ammod (AM Modulation) and amdemod (AM Demodulation) MATLAB functions documentation for further customizing the code as per your needs.
  1 件のコメント
Dimitrios Kyriakidis
Dimitrios Kyriakidis 2023 年 6 月 2 日
Thank you very much

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePHY Components についてさらに検索

製品


リリース

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by