|
5.5
Oct 9, 2015 3:02:48 GMT
Post by matthorr on Oct 9, 2015 3:02:48 GMT
From the table in Lomax: \[ \sigma^3 - (1+2\lambda h)\sigma^2 + \frac{3}{2}\lambda h\sigma - \frac{1}{2}\lambda h = 0 \] Scannable Document on Oct 8 2015 1_23_05 PM.pdf (773.97 KB) With \( \sigma \doteq e^{i\theta} \), the Newton-Raphson method is used to find the value of \( \lambda h \) for each \( \theta \) from 0 to \( 2\pi \). \[ F(\lambda h) = e^{i3\theta} - (1+2\lambda h)e^{i2\theta} + \frac{3}{2}\lambda he^{i\theta} - \frac{1}{2}\lambda h \] \[ \frac{\mathrm{d} F(\lambda h)}{\mathrm{d} (\lambda h)} = -2e^{i2\theta}+\frac{3}{2}e^{i\theta}-\frac{1}{2} \] Here is the main part of the code: for n=1:jmax for c = 1:3 f = exp(1i*3*theta(n))-(1+2*z(n))*exp(1i*2*theta(n))+3/2*z(n)*exp(1i*theta(n))-1/2*z(n); df = -2*exp(1i*2*theta(n))+3/2*exp(1i*theta(n))-1/2; z(n) = z(n)-f/df; % Update estimate end z(n+1) = z(n); % Use last value as next intial guess end
|
|