Hi, friends
CODE:
/* this is part of specification of biological properties */
Area = 100 // um2
Nasingle=0
Ksingle=0
objref u,f
func gauss(){
m=0 s=1
u = new Random()
geu=u.uniform(0,1)
z=s*sqrt(2*log(1/(1-geu)))
feu=u.repick()
x=m+z*sin(2*PI*feu)
return x
}
// argument should be desired area in um2
func varyansm() {
varm=(2/Nasingle)*(ChannelBuild[0].aliases.am*ChannelBuild[0].aliases.bm)/(ChannelBuild[0].aliases.am+ChannelBuild[0].aliases.bm)
return varm
}
func varyansh() {
varh=(2/Nasingle)*(ChannelBuild[0].aliases.ah*ChannelBuild[0].aliases.bh)/(ChannelBuild[0].aliases.ah+ChannelBuild[0].aliases.bh)
return varh
}
func varyansn() {
varn=(2/Ksingle)*(ChannelBuild[1].aliases.an*ChannelBuild[1].aliases.bn)/(ChannelBuild[1].aliases.an+ChannelBuild[1].aliases.bn)
return varn
}
vma=varyansm()
vh=varyansh()
vn=varyansn()
proc noise(){
gu=gauss()
gm=sqrt(vma)*gu
ChannelBuild[0].aliases.m'=ChannelBuild[0].aliases.m'+gm
gh=sqrt(vh)*gu
ChannelBuild[0].aliases.h'=ChannelBuild[0].aliases.h'+gh
gn=sqrt(vn)*gu
ChannelBuild[1].aliases.n'=ChannelBuild[1].aliases.n'+gn
}
I wan to add gm,gh,gm values in each t times in m',h',n' and i writed a hoc file with above codes but
i take error messages wich is "nrniv: division by zero
in foxlu.hoc near line 40
vma=varyansm()
^
varyansm( )
xopen("foxlu.hoc" )
NEURONMainMenu[0].execute1("{xopen("foxlu.hoc")}" )
NEURONMainMenu[0].load_file(0"./foxlu.hoc" , )
and others"
how can i do different any way?
i known .mod file
i must wirte mod file
but i don't know how it will be writen
can anyone write a example for me
can you help me about this code
The basics of how to develop, test, and use models.
Jump to
- The NEURON Forum
- ↳ Goals and Policies
- ↳ Suggestions and Feedback
- ↳ NEURON Announcements
- NEURON installation and configuration
- ↳ OS X
- ↳ MSWin
- ↳ UNIX/Linux
- NEURON design
- ↳ NEURON + Python
- ↳ Reaction-diffusion in NEURON
- Making and using models with NEURON
- ↳ NEURON hacks
- ↳ Hot tips
- ↳ Getting started
- ↳ The GUI
- ↳ Anatomically detailed models
- ↳ Adding new mechanisms and functions to NEURON
- ↳ Modeling networks
- ↳ Optimization
- ↳ Parallel NEURON
- ↳ Other questions
- Tools of interest to NEURON users
- ↳ HNN: Human Neocortical Neurosolver
- ↳ LFPsim
- ↳ NetPyNE
- ↳ SimAgent
- ↳ SimTracker
- ↳ Other tools
- NEURON in neuroscience education
- ↳ From Computer to Brain
- ↳ Neurons in Action
- ↳ SWIMMY
- ↳ Other ways of using NEURON in neuroscience education
- Data sharing
- ↳ ModelDB and other online sources of models
- ↳ Specific models
- ↳ Policies and procedures
- Computational neuroscience in general
- ↳ General questions and discussions about computational neuroscience
- ↳ Employment and educational opportunities