Undefined function or variable 'srrc_pulse'.

조회 수: 3 (최근 30일)
Soobin Choi
Soobin Choi 2017년 5월 29일
댓글: KSSV 2017년 5월 29일
How can i fix this problem based on this code?
Fs = 10; %Sampling frequency
T = 1/Fs; %Symbol period
L = 1000; %Number of points
t = (0:L-1)*T; %Time vector
phi1 = srrc_pulse(1, 1/10, 4, 0); %SRRC pulse
figure
plot(Fs*t(1:50), phi1(1:50));
NFFT = 2^nextpow2(L);
Y = fft(phi1, NFFT)./L;
Y2 = fftshift(fft(phi1, NFFT)./L);
f = Fs/2*linspace(0,1,NFFT/2+1);
f2 = ((0:NFFT-1) -ceil((NFFT-1)/2))/NFFT/T;
figure
plot(f, 2*abs(Y(1:NFFT/2+1))); %one sided
figure
plot(f2, 2*abs(Y2)); %two sided
  댓글 수: 1
KSSV
KSSV 2017년 5월 29일
This is not an inbuilt function of MATLAB.

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

답변 (1개)

mizuki
mizuki 2017년 5월 29일
The error message shows the answer. You use the function "srrc_pulse.m" but you do not have srrc_pulse.m. If you know that you have it in the different directory, you need to set search path.

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by