MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: changing variable in an equation


 Updating my question.
Those that have responded have requested further information. I hope this
will help.

First of all, thanks to those that have helped me with this problem. Please
let me explain what is going on.  I am the same person that asked about
phase portraits. I am writing a text book using Mathematica to describe how
neurons work.  I ran across the book that I describe below.  I knew that the
way I was describing how neurons are working was wrong, but I had no modern
books and so on.  I am disabled and home bound.  I thought the book that I
found is a gold mine for me, but it is very hard for me to follow, due to
his manner of writing which is more up to date than anything that I am use
to.  So I am like a kid in a class room again, trying to understand what the
author is talking about.  I need to be able to do what he does with another system but with Mathematica.  Due to medical problems, I know I don't get to spend
enough time working on Mathematica.  It makes it a lot rougher when you
can't work with the program like you should. I am lucky to get 3 hours a day
at the computer.  

I am using the book Dynamical Systems in Neuroscience, by Dr. E. M.
Izhikevich.  I am working on chapter 3, one dimensional systems.  

What he does is break up a hard problem into small steps to get you use to
his style.  And what he has done is to take the equation c*V'= -gsubL(V -
Vsubnl)  Where c = 10, gsubL = 19, Vsubnl = -67.  His solution comes out as
V'(t)= Vsubnl + (V0 - VsubnL)*e^-gsubL * t/c.  And V0 is the initial voltage
in the membrane which he changes in order to get each plot.  He starts out
with an initial voltage of 0 and works to -100.  He got all of these numbers
in an experiment.  He does not supply the numbers he used.  Its like he is
skimming over everything and thinking that you already know it what he is
doing.  

He then uses another system to solve it and he shows the plots.  What you end up
with is very similar to what several people have sent me, where you have
many plots that are similar to e^-x.  His vertical axes is V or the membrane
voltage from -100 to 0, and the horizontal axes is time going from 0 to 5.


His phase portrait for this is a straight line.  The vertical axes is F(V)=
V', and the horizontal axes is the membrane voltage going from -100 to 0.
The line starts on the vertical axes which is "graph of F(V) = V'" at
(V'=-67 & V = -100) and ends at the horizontal axes at (V = 20 & V' = 0),
where the horizontal axes is the membrane potential V.  The plots in his
book are very small so I had to guess at the numbers.  

What I tried to do was to just plot his solution which is V(t)= Vsubnl + (V0
- Vsubnl)times e to the -gsubL * t divided by c.  What I did was make up
different equations such as vt1 = -67+(0-(-67))*e^-19t/c  and substitute
values for t.  And then make another equation with a different V0 and do the
same thing.  Then finally combine them using Plot{{vt1,vt2 and so on},
{t,0,5}].

These results mimic his plots so I am on the right track.  It's just that my
way takes an enormous amount of time.  I know that there must be a better
way to do this with Mathematica.  That's the whole point of my request for
help.  

Thank You
Jake
noslowski at comcast.net  

-----Original Message-----
From: DrMajorBob [mailto:btreat1 at austin.rr.com] 
Sent: Saturday, February 12, 2011 5:20 AM
To: mathgroup at smc.vnet.net
Subject: [mg116393] [mg116378] Re: changing variable in an equation

You have a missing parenthesis, so I'll have to guess where you wanted it.

Your three examples don't seem to match the phrase "working from -100 to
100".

And there's a third variable -- x -- that you haven't explained. I'll give
it a fixed value.

So... working from -10 to t+10 to save time, and t varying from 0 to .1 so
that everything isn't obscured by the scale:

Clear[v]
v[i_, x_, t_] = -67 + (10 (i - 1) + 67) x E^(-19 x t)/10; x = 3;
Plot[Evaluate@Table[v[i, x, t], {i, -10, 10}], {t, 0, .1},
  PlotRange -> All]

In case it's x that should vary from -100 to 100, then I don't know what
values i should take on.

But... if you want to vary both, here's an example:

Plot[Evaluate@Table[v[i, x, t], {i, -10, 10}, {x, 0, 3}], {t, 0, .1},
  PlotRange -> All]

Notice that this is colored differently:

Plot[Table[v[i, x, t], {i, -10, 10}, {x, 0, 3}], {t, 0, .1},
  PlotRange -> All]

That's what Evaluate is about, in the other plots.

Bobby

On Fri, 11 Feb 2011 03:17:10 -0600, J and B <noslowski at comcast.net> wrote:

> Below is an equation that I am working on. I know there is some way to 
> work it out better than what I am doing.  I would like the variable a 
> to change in increments of 10, from -100 to 100.
> Thanks
> my main equation is:  v = -67+(a-(-67) x E ^ (-19 x t)/10 what I am 
> doing:
> v1= -67+(0-(-67) x E ^ (-19 x t)/10;
> v2= -67+(-10-(-67) x E ^ (-19 x t)/10; v3= -67+(-20-(-67) x E ^ (-19 x 
> t)/10; and so on and working from -100 to 100 Then I use Plot [ { 
> v1,v2, v3 ........},{t,0,5}, PlotRange -> All] Please note that I have 
> added some spaces in to make it more readable.
> thanks
> Jake


--
DrMajorBob at yahoo.com




  • Prev by Date: DC-Area Mathematica Special Interest Group
  • Next by Date: Re: Another point about Mathematica 8.0
  • Previous by thread: Re: changing variable in an equation
  • Next by thread: Re: changing variable in an equation