What is alternative of dmodce in version 2017

조회 수: 14 (최근 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 CenterFile Exchange에서 Applications에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by