Skip to content

Instantly share code, notes, and snippets.

@tabris2012
Created November 16, 2012 03:00
Show Gist options
  • Save tabris2012/4083581 to your computer and use it in GitHub Desktop.
Save tabris2012/4083581 to your computer and use it in GitHub Desktop.
# encoding: utf-8
from pylab import *
def XDiff(x, y, a):
return -x + a * y + y * x **2 #Sel'kovモデル
def YDiff(x, y, a, b):
return b - a * y - y * x **2
def XNull(x, a): #xヌルクライン
return x / (a + x **2)
def YNull(x, a, b): #yヌルクライン
return b / (a + x **2)
x = arange(0, 3.0, 0.05) #タンパク質濃度の定義域
a = [0.1, 0.5] #ADPの合成速度。τ=0はa=(2√3 - 3)/4
b = 0.5 #F6Pの合成速度。
xNull = [] #xについてのヌルクラインを作成する
yNull = []
for i in a:
xNull.append(XNull(x, i))
yNull.append(YNull(x, i, b))
"""
for i in range(2):
figure()
xlim(0, 2)
plot(x, xNull[i])
plot(x, yNull[i])
for j in arange(0.05, 2.1, 0.1):
for k in arange(0.05, YNull(0, a[i], b), YNull(0, a[i], b)/20.0):
quiver(j, k, XDiff(j, k, a[i]), YDiff(j, k, a[i], b))
"""
for i in range(2):
figure()
xlim(0, 2)
ylim(0, 8)
plot(x, xNull[i])
plot(x, yNull[i])
show() #全figure描画
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment