Recent content by LordV
-
L
Graduate Why aren't the <v^2> and <vr^2> curves different in my Hernquist model?
Hmmm, any ideas?- LordV
- Post #2
- Forum: Astronomy and Astrophysics
-
L
Graduate Why aren't the <v^2> and <vr^2> curves different in my Hernquist model?
Hello, I would appreciate very much some help on this problem. I have a Hernquist model (distribution function) and I am trying to generate equal mass initial conditions. The way I do it is this. I have the mass profile M(r) and I pick say 10^6 random numbers between 0 and 1=M(r->inf). Then I...- LordV
- Thread
- Dispersion Velocity
- Replies: 1
- Forum: Astronomy and Astrophysics
-
L
Mathematica Mathematica Experts: Convert Expression to C++ Code
Hmmm, I think I did it(although I am sure there is a more elegant way). First I used CForm[expresion] /. Power -> pow and the I used the output as a string and I used: StringReplace["output",{"y0" -> "y[0]", "y1" -> "y[1]", "y2" -> "y[2]", "y3" -> "y[3]"}]- LordV
- Post #2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
L
Mathematica Mathematica Experts: Convert Expression to C++ Code
Hi all, here is a question for mathematica experts(or not :smile:) I have an expression of the form: -6615. y[0] + 282.72 y[0]^3 + 1.3244 y[0]^5 - 0.002624 y[0]^7 - 178.28 y[1] + 152.912 y[0]^2 y[1]-((1309.5 y[0]^3 y[1]^4)/(y[0]^2 + y[1]^2)^4)... and I want to transfer this expression to...- LordV
- Thread
- Mathematica
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
L
Mathematica Finding Roots of Interpolated Function in Mathematica
Thanks a lot- LordV
- Post #4
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
L
Mathematica Finding Roots of Interpolated Function in Mathematica
I used NSolve and I got t->InverseFunction[InterpolatingFunction... is there any way to use this?- LordV
- Post #2
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
L
Mathematica Finding Roots of Interpolated Function in Mathematica
Hello, I have an interpolated function at mathematica x->InterpolatingFunction blahblahblah which looks like a sin I want to find all the roots between {x0,x1} (in a list if possible) Is there any way to achieve this? I tried FindRoot and Reduce but I couldn't...- LordV
- Thread
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX