: $Id: aux_fun.inc,v 1.1 2009/11/04 01:24:52 samn Exp $ COMMENT //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // // NOTICE OF COPYRIGHT AND OWNERSHIP OF SOFTWARE // // Copyright 2007, The University Of Pennsylvania // School of Engineering & Applied Science. // All rights reserved. // For research use only; commercial use prohibited. // Distribution without permission of Maciej T. Lazarewicz not permitted. // mlazarew@seas.upenn.edu // //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ENDCOMMENT :------------------------------------------------------------------- FUNCTION fun1(v(mV),V0(mV),A(/ms),B(mV))(/ms) { fun1 = A*exp((v-V0)/B) } FUNCTION fun2(v(mV),V0(mV),A(/ms),B(mV))(/ms) { fun2 = A/(exp((v-V0)/B)+1) } FUNCTION fun3(v(mV),V0(mV),A(/ms),B(mV))(/ms) { if(fabs((v-V0)/B)<1e-6) { :if(v==V0) { fun3 = A*B/1(mV) * (1- 0.5 * (v-V0)/B) } else { fun3 = A/1(mV)*(v-V0)/(exp((v-V0)/B)-1) } } FUNCTION min(x,y) { if (x<=y){ min = x }else{ min = y } } FUNCTION max(x,y) { if (x>=y){ max = x }else{ max = y } }