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
%Download and uncompress: | |
%http://users.ece.gatech.edu/~justin/l1magic/downloads/l1magic-1.11.zip | |
addpath l1magic/ | |
%W with smooth connected points | |
L = 32; | |
z = linspace(-.25,1.25,L); | |
[Z1,Z2] = meshgrid(z,z); | |
rho = .015; |
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
%Download and uncompress: | |
%http://users.ece.gatech.edu/~justin/l1magic/downloads/l1magic-1.11.zip | |
addpath l1magic/ | |
%W with smooth connected points | |
L = 32; | |
z = linspace(-.25,1.25,L); | |
[Z1,Z2] = meshgrid(z,z); | |
rho = .015; |
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
%params | |
N = 512; | |
k = 128; | |
p = .5; | |
%form block clustered matrix | |
A = rand(N,N)>p;%or randn(N,N) also | |
B = diag([50*ones(1,k) 1*ones(1,N-k)]); | |
C = A+B; | |
%compute spectrum |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
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
{ | |
"metadata": { | |
"language": "Julia", | |
"name": "", | |
"signature": "sha256:8d7e42b7a30a22ad0c12a19f77345d3e7789701850f74dbce0e3573ca1a227e4" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ |
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
clear g | |
T = 10; | |
m_exact = 1; | |
b_exact = 2; | |
x_exact = [m_exact; b_exact] | |
t = [0:T-1]/(T-1); | |
A = [t' ones(size(t'))]; |
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
from scipy.integrate import odeint | |
import numpy as np | |
import pylab as pylab | |
def mm_rate(z,k): | |
"The Michealis-Menten reaction rate a concentration z and rate parameter k" | |
s,e,c,j = z | |
k_bind,k_unbind,k_cat = k | |
return np.array([-k_bind*s*e+k_unbind*c, |
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 = 5; | |
C = triu(ones(N,N)); | |
A = C(1:N,N:-1:1); | |
A(N,N) = 1; | |
D = A*ones(N,N)*A - A^3; | |
H = (A==0).*D/2; | |
U = sum(H(:)) |
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
M = 3; N = 4; | |
p = .2; | |
B = double(rand(M,N)>p); | |
C1 = B*B'; | |
D1 = repmat(diag(C1),1,M); | |
eta1 = C1.*(D1~=D1')./(min(D1,D1')); | |
C2 = B'*B; |
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
import io | |
from IPython.nbformat import current | |
#function for loading external nb | |
def execute_notebook(nbfile): | |
with io.open(nbfile) as f: | |
nb = current.read(f, 'json') | |
ip = get_ipython() |
OlderNewer