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
Dale
Mentor
Insights Author
2020 Award
31,970
8,880
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}]
 
  • #3
108
0
OK thanks.
 
  • #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
Replies
3
Views
844
  • Last Post
Replies
6
Views
13K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
1
Views
2K
Replies
5
Views
4K
Replies
12
Views
24K
Replies
4
Views
8K
Top