What is alternative of dmodce in version 2017

15 views (last 30 days)
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

Answers (1)

Kavya Vuriti
Kavya Vuriti on 5 Aug 2020
Hi,
Here is an answer that might help.

Categories

Find more on Applications in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!