how to solve this error?

5 Ansichten (letzte 30 Tage)
Kuheli Mondal
Kuheli Mondal am 13 Apr. 2016
Bearbeitet: Azzi Abdelmalek am 13 Apr. 2016
??? 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');

Antworten (0)

Kategorien

Mehr zu Fixed-Point Filters finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by