Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: changing variable in an equation
Replies: 4   Last Post: Feb 13, 2011 5:51 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 1,448
Registered: 11/3/08
Re: changing variable in an equation
Posted: Feb 12, 2011 5:20 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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

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:

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.


On Fri, 11 Feb 2011 03:17:10 -0600, J and B <noslowski@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


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.