I couldn't fix problem

2 ビュー (過去 30 日間)
yasin
yasin 2013 年 10 月 26 日
コメント済み: yasin 2013 年 10 月 26 日
if true
eksi_kisim=linspace(0,1,2000);
arti_kisim=linspace(1,0,2000);
filter=[zeros(1,3513) eksi_kisim arti_kisim zeros(1,3513)];
channel_st= abs(shift_xx).*filter;
filter_st=ifft(channel_st);
figure;
dt=filter_st.*cos(wc*t);
plot(t,abs(dt));
title('dt grafic');
xlabel('time');
ylabel('dt');
axis([0 1 -5 15]);
figure;
tt=fft(dt);
plot(abs(fftshift(tt)));
title('dt spectrum grafic');
xlabel('frequency');
ylabel('dt');
% filter code
[B,A]= butter(5,0.25);
out=filter(B,A,dt);
figure;
plot(t,out);
axis([0 1 0 8]);
% code
end
out=filter(B,A,dt); in that line Subscript indices must either be real positive integers or logicals. this error come up

採用された回答

per isakson
per isakson 2013 年 10 月 26 日
編集済み: per isakson 2013 年 10 月 26 日
In this line
filter=[zeros(1,3513) eksi_kisim arti_kisim zeros(1,3513)];
you make filter a double array. Because of that the function filter cannot be called. Surely, that was not your intention.
  2 件のコメント
yasin
yasin 2013 年 10 月 26 日
編集済み: yasin 2013 年 10 月 26 日
I want to create this filter
yasin
yasin 2013 年 10 月 26 日
thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnalog Filters についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by