Skip to content

Instantly share code, notes, and snippets.

@affandhia
Created March 13, 2018 08:42
Show Gist options
  • Select an option

  • Save affandhia/372f198ef780531f896f84ff9291bf3b to your computer and use it in GitHub Desktop.

Select an option

Save affandhia/372f198ef780531f896f84ff9291bf3b to your computer and use it in GitHub Desktop.
D = diag(diag(A));
L = tril(-A,-1);
U = triu(-A,1);
Tj = inv(D)*(L+U);
rho_Tj = max(abs(eig(Tj)));
w = 2./(1+sqrt(1-rho_Tj^2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment