Created
January 9, 2015 22:49
-
-
Save cc7768/77e4b81cce34895262d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = 10 | |
srand(42) | |
ad = randn(n, n) | |
bd = randn(n, n) | |
ac = randn(n, n) + randn(n, n)im | |
bc = randn(n, n) + randn(n, n)im | |
# This is the "not sorted" schur | |
sfd_ns = schurfact(ad, bd) | |
sfc_ns = schurfact(ac, bc) | |
# Find which are less than unity | |
selctgd(a, b, c) = (a+b)/c < 1. ? 1. : 0. | |
selctgd(a, b, c) = real(a/b * conj(a/b)) < 1.0 ? 1. : 0. | |
sfd_s = schurfact(ad, bd, selctgd) | |
sfc_s = schurfact(ac, bc, selctgc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment