clear; close all; s = tf('s'); xis = [0.1 0.5 1]; es = sqrt(10.^(xis/10)-1); e = es(1); tmp = sqrt(1+e^(-2))+e^(-1); for n = 1:10 D = 1; for k=1:n sinhv = 1/2*(tmp^(1/n)-tmp^(-1/n)); coshv = 1/2*(tmp^(1/n)+tmp^(-1/n)); sigma_k = -sin((2*k-1)/(2*n)*pi)*sinhv; omega_k = cos((2*k-1)/(2*n)*pi)*coshv; sk = sigma_k + i*omega_k; D = D*(s-sk); end coef(D) end function n = coef(D) [n,d] = tfdata(D); n = cell2mat(n); n = n(2:end); n = real(n); end
実行結果
>> cheb2 ans = 6.5522 ans = 2.3724 3.3140 ans = 1.9388 2.6295 1.6381 ans = 1.8038 2.6268 2.0255 0.8285 ans = 1.7440 2.7707 2.3970 1.4356 0.4095 ans = 1.7122 2.9658 2.7791 2.0478 0.9018 0.2071 ans = 1.6932 3.1835 3.1692 2.7051 1.4829 0.5618 0.1024 ans = 1.6810 3.4129 3.5648 3.4185 2.1592 1.0666 0.3264 0.0518 ans = Columns 1 through 8 1.6727 3.6490 3.9638 4.1916 2.9339 1.7341 0.6942 0.1918 Column 9 0.0256 ans = Columns 1 through 8 1.6668 3.8891 4.3654 5.0262 3.8085 2.5790 1.2297 0.4572 Columns 9 through 10 0.1070 0.0129 >>