Plotting arbitrary constants in mathematica

  • Mathematica
  • Thread starter kraigandrews
  • Start date
  • #1
108
0
How do you plot arbitrary constants in mathematica? for example r(psi)=a(1-eCos(psi)), where a and e are some constant.

Thanks in advance for the help.
 

Answers and Replies

  • #2
29,969
6,359
Well, you cannot plot a function with arbitrary constants. Where would the computer draw the line? However, what you can do is do a Plot inside a Manipulate, like this:

Manipulate[Plot[a (1 - e Cos[psi]), {psi, -1, 1}], {{a, 1}, -2, 2}, {{e, 1}, -2, 2}]
 
  • #4
313
1
Some constants can be absorbed into variables by defining dimensionless variables.
This basically treats the constant as the "natural scale" for that dimension.

In your example, you can define the dimensionless, s = r/a
But e is dimensionless and can't really be absorbed anywhere.

So

Manipulate[ Plot[ 1 - e Cos[psi], {psi, -1, 1}, AxesLabel->{"psi","s=r/a"}], {{e,1}, -2, 2}]
 

Related Threads on Plotting arbitrary constants in mathematica

  • Last Post
Replies
9
Views
15K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
6
Views
13K
Replies
3
Views
724
  • Last Post
Replies
2
Views
2K
Replies
2
Views
11K
Replies
4
Views
4K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
3K
Replies
1
Views
2K
Top