Why do I get an error on line 17?

조회 수: 1 (최근 30일)
Porgs
Porgs 2018년 5월 7일
댓글: KSSV 2018년 5월 7일
clc
deviation = (1) .^ 0.5;
n = deviation .* randn(100000, 1); % noise
t = [-5: 0.01: 4.99]; % time
p = 5 .* sin(20 .* pi .* t + (pi / 4)); % pulse p(t)
T = (2 * 1500) / 1000;
t2 = t - T;
p2 = 5 * sin(20 .* pi .* t2 + (pi / 4));
r = p2 + n;
x = randn(length(t), 1);
i = (t - T);
y = linfilt(x, i, length(t));
figure(1);
subplot(3, 1, 1);
plot(t, p);
title('Plot 4a: Pulse p(t)'); % pulse p(t)
xlabel('Time');
ylabel('Amplitude');
grid;
subplot(3, 1, 2);
plot(t2, r);
title('Plot 4b: Received Signal r(t)'); % received signal r(t)
xlabel('Time');
ylabel('Amplitude');
axis([-5 4.99 min(y) max(y)]);
grid;
[C, tau] = xcorr(r,p); % cross-correlation R_rp(tau)
subplot(3, 1, 3);
plot(tau, C);
title('Plot 3c: Cross-Correlation R_rp(tau)');
grid;
  댓글 수: 2
Walter Roberson
Walter Roberson 2018년 5월 7일
We do not know which is line 17. Also, linfit() is not a MATLAB routine. There are several linfit() in the File Exchange, but we would not know which one of those you are using.
KSSV
KSSV 2018년 5월 7일
?What is this function linfilt?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Pulse and Transition Metrics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by