フィルターのクリア

Array indices must be positive integers or logical values

1 回表示 (過去 30 日間)
Claudia Lizeth Medina López
Claudia Lizeth Medina López 2019 年 11 月 9 日
編集済み: Jim Riggs 2019 年 11 月 9 日
I'm trying to do the Bairstow method but the fuctions to get delta r and delta s mark me as an error
coeff= length(fx);
r=r0;
s=s0;
ErrR=100;
ErrS=100;
while ErrR>tol || ErrS>tol
fx=fx(coeff:-1:1);
b(coeff)= fx(coeff)
b(coeff-1)= fx(coeff-1)+r*b(coeff);
for rs=(coeff-2:-1:1)
b(rs)= fx(rs)+r*b(rs+1)+s*b(rs+2);
end
c(coeff)= b(coeff);
c(coeff-1)= b(coeff-1)+r*c(coeff);
for rs=(coeff-2:-1:2)
c(rs)= b(rs)+r*c(rs+1)+s*c(rs+2);
end
deltaR= (b(0)*c(3)-b(1)*c(2))/((c(2))^2-c(1)*c(3))
deltaS= (b(1)*c(1)-b(0)*c(2))/((c(2))^2-c(1)*c(3))
r= deltaR+r;
s= deltaS+s;

回答 (1 件)

Jim Riggs
Jim Riggs 2019 年 11 月 9 日
編集済み: Jim Riggs 2019 年 11 月 9 日
Matlab does not allow an index value of zero.
deltaR = (b(0) ...
similar in deltaS.

カテゴリ

Help Center および File ExchangeDirect Search についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by