What is alternative of dmodce in version 2017

17 ビュー (過去 30 日間)
Mostafa Salah
Mostafa Salah 2020 年 5 月 6 日
回答済み: Kavya Vuriti 2020 年 8 月 5 日
I need to use it in this code
clear; clc; close all
n = 4; % Number of symbol intervals
M = 16; % Use M-ary modulation
Fd = 1; % Sampling rate of the message signal
Fs = 100; % Sampling rate of the modulated signal
fc = 18; % Carrier frequency
x = randi([0 M-1],n,1); % Random multilevel message signal (from zero to M-1)
xt = reshape(repmat(x,1,Fs)',1,n*Fs); t = 1:1:n*Fs; % Arrange time axis
% PAM (ASK) Signals
% A) Baseband ASK
sask = real(dmodce(x,Fd,Fs,'ask',M));
modmap('ask',M);
set(gcf,'Color',[1 1 1])
pause
subplot(2,1,1);
plot(t,xt);
title('Input signal x(t) as M-ary levels')
axis ([min(t) max(t) -0.1 max(x)*1.1])
set(gca,'XTick',[50 100 150 200 250 300 350 400])
set(gca,'XTickLabel',{'T/2';'T';'3T/2';'2T';'5T/2';'3T';'10T/2';'4T'},'FontWeight','bold');
subplot(2,1,2); plot(t,sask); title('ASK baseband signal - s_m(t)'); xlabel('Time Axis')
axis ([min(t) max(t) -1.1 1.1])
set(gca,'XTick',[50 100 150 200 250 300 350 400])
set(gca,'XTickLabel',{'T/2';'T';'3T/2';'2T';'5T/2';'3T';'10T/2';'4T'},'FontWeight','bold');
pause; clf reset
% B) Bandpass PAM (ASK)
uask = dmod(x,fc,Fd,Fs,'ask',M);
subplot(2,1,1); plot(t,sask); set(gcf,'Color',[1 1 1])
title('ASK baseband signal - s_m(t)')
axis ([min(t) max(t) -1.1 1.1])
set(gca,'XTick',[50 100 150 200 250 300 350 400])
set(gca,'XTickLabel',{'T/2';'T';'3T/2';'2T';'5T/2';'3T';'10T/2';'4T'},'FontWeight','bold');
subplot(2,1,2); plot(t,uask); title('ASK bandpass signal - u_m(t)'); xlabel('Time Axis')
axis ([min(t) max(t) -1.1 1.1])
set(gca,'XTick',[50 100 150 200 250 300 350 400])
set(gca,'XTickLabel',{'T/2';'T';'3T/2';'2T';'5T/2';'3T';'10T/2';'4T'},'FontWeight','bold');
pause

回答 (1 件)

Kavya Vuriti
Kavya Vuriti 2020 年 8 月 5 日
Hi,
Here is an answer that might help.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by