필터 지우기
필터 지우기

i am trying to do some signal manipulation but i keep getting errors

조회 수: 5 (최근 30일)
justin stephens
justin stephens 2019년 3월 9일
댓글: Arrian Farahani 2020년 10월 29일
I am having some issues with the project and I was hoping that you could help. I keep getting an error when I try to run this code. the code creates two different fecieved signals and the book says that the pam command creates a random sequence of symbols drawn from the alphabet +- 1, +-3 and then uses hamming to create a pulse shape.
N=10000; % # symbols, oversampling factor
M=20; % # symbols, oversampling factor
Ts=.0001; % # symbols, oversampling factor
time=Ts*N*M; % sampling interval & time vector
t=Ts:Ts:time; % sampling interval & time vector
m=pam(N,4,5); % 4-level signal of length N
mup=zeros(1,N*M);
mup(1:M:N*M)=m; % oversample by integer length M
ps=hamming(M); % blip pulse of width M
s=filter(ps,1,mup); % convolve pulse shape with data
fc=1000; % carrier freq
phoff=-1.0; % carrier phase
c=cos(2*pi*fc*t+phoff); % construct carrier
rsc=s.*c; % modulated signal (small Carrier)
rlc=(s+1).*c; % modulated signal (large carrier
I keep getting an error that pam(N,4,5) does not exist but this code is strait from the book. Could anyone offer any help?

답변 (1개)

Walter Roberson
Walter Roberson 2019년 3월 9일
pam() is from the BioInformatics Toolbox, and cannot be invoked with three integer parameters.
For signal processing Pulse Amplitude Modulation, the Mathworks routine is pammod . The third parameter to that is the initial phase, and it seems unlikely that you would be using an initial phase of 5 radians.
I would suggest that it is likely that "the book" supplied its own pam() routine.
  댓글 수: 3
justin stephens
justin stephens 2019년 3월 10일
i am very sorry that the photo is in this orientation....... i have scoured the software reciever design book for a proprietary function of pam(). That is why i am so confused about this because pam() is part of a bio library.
Arrian Farahani
Arrian Farahani 2020년 10월 29일
there is a pam.m script in the github file for the book. Run this as a function and it will call it when running this script

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Filter Banks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by