我正在尝试从我的函数中获取输出,但正在跳过第一次迭代。我不断得到 ZETA = 1.000 而不是 ZETA = -18.7026 请帮助!
EIG = [
-18.7026;
-4.6179 + 7.4827j;
-4.6179 - 7.4827j;
-1.1268 + 4.3335j;
-1.1268 - 4.3335j;
-0.3372 ]
for i = 1:6;
SIG(i) = real(EIG(i));
OMG(i) = imag(EIG(i));
if OMG(i) == 0;
ZETA(i) = SIG(i);
else
ZETA = -SIG ./(sqrt(SIG.^2 + OMG.^2));
end
end