how to solve this error?
조회 수: 11 (최근 30일)
이전 댓글 표시
??? Error using ==> lti.subsref at 56
Use two or more subscripts to select or delete all elements,
as in the "sys(:,:)" command.
Error in ==> conv at 40
c = conv2(a(:),b(:),shape);
Error in ==> secondary at 14
d1=conv(s,y);
my code is
function x=signal(f,fs,N)
% sinusoid
f=30; %frequency,
N=20; %number of samples
fs=100; %sampling frequency
A=2; %amplitute
%Total sampling time = 1 second
n = 0:N-1; % numbering the samples
x = A*sin(2*pi*f*n/fs);
w=0.3;
[b,a]=butter(N,w);
y = filter(b,a,x);
s=tf([0.4923 0.96 1 0],[0.3352 1.06 1]);
d1=conv(s,y);
ff_sec = abs(fft(d1,1024));
subplot(2,1,1);
plot(d1)
subplot(2,1,2);
plot(ff_sec,'m');
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Filter Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!