2013-01-01から1年間の記事一覧

1D Heat Conduction with a delta function

Analytic solution #heat conduction with a delta function import numpy as np import matplotlib.pyplot as plt import time M = 100; #the number of division x = np.linspace(0, 1, M+1); N = 600; #finite series #T = [0.001, 0.004, 0.016, 0.064] …

Streamlines of A Free Vortex

We think a case of , .Then, when we think about velocity of this flow along x and y axis. Then we can get Figure1.However, when we think about inertial frame of reference. In this particular case, velocity is equivalent to this formula. [v…

C++ compiling with Mac terminal

gcc -c main.cpp gcc -o main.cgi main.o -lstdc++ ./main.cgi

Synaptic Conductance(alpha function, Python)

import math import numpy as np import matplotlib.pyplot as plt def trapsyn(dt, Tfin, gsyn): VCl = -68; #mV Cm = 1; #micro F/cm^2 gCl = 0.3; #mS/cm^2 z = 2./dt; Nt = int(math.ceil(1 + Tfin / dt)); #number of time steps V = np.zeros((Nt, 1))…

Implementation of quadratic integrate-and-fire model with Runge-Kutta method

[:large]Neurdon #-*- coding:utf-8 -*- import numpy as np import matplotlib.pyplot as plt #quadratic integrate and fire model class IzhNeuron: def __init__(self, label, a, b, c, d, v0, u0=None): self.label = label self.a = a; self.b = b sel…

Implementation of Fitzhug-Nagumo model with Runge-Kutta method

#-*- coding:utf-8 -*- import numpy as np import matplotlib.pylab as plt #node def phase_func(x, t, a=-1., b=0., c=0., d=-2.): return np.array([a*x[0]+b*x[1], c*x[0] + d*x[1]]) #focus def phase_focus(x, t, a=1., b=2., c=-2., d=1.): return n…

Maclaurin Expansion of the Telegrapher’s Equation and Python Implementation

Kac(Kac, 1974) proved his stochastic model can express the telegrapher’s equa- tion(1). In this report, I would like to predict a function F(x, t) with using the Maclaurin ex- pansion. The expansion of F(x, t) is showed like (2). When we d…

Science of the appetite(Sakurai, 2012)

Chapter 1 Origin of appetite Feature of weight: homeostatically weight is controlled a specific part of brain: the hypothalamus which is related to basic desires such as appetite, sleep, emotion. fear and excitement is sent from the limbic…