Skip to content

Instantly share code, notes, and snippets.

@cc7768
Created Jan 9, 2015
Embed
What would you like to do?
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