330 reputation
19
bio website andrewjaffe.net/blog
location London, United Kingdom
age 46
visits member for 5 months
seen 9 hours ago
stats profile views 29
Astrophysicist, cosmologist, Mac user, blogger, python fan.

May
16
comment Write a function that returns the logarithmic derivative
Note that the expressions like func[f_]:=f'/f are not instructions about how to differentiate the particular function f that you've defined as "In:"! That is the definition for the pattern f_ which you just happen to have used the same letter for as your function.
Apr
2
awarded  Enlightened
Apr
2
awarded  Nice Answer
Apr
2
comment How to change the value of an array that is outside the For loop, from inside the For loop
Please put all this in the question! Do you want H to be a function of d? If so, define it that way.
Apr
2
comment How to change the value of an array that is outside the For loop, from inside the For loop
I think we need more information about what you're actually trying to do. When does H change? Inside the Do? Should eigenvect change when that happens? If so, you need to explicitly call Eigensystem each time.
Apr
2
awarded  Commentator
Apr
2
comment How to change the value of an array that is outside the For loop, from inside the For loop
Have you tried that?
Apr
2
comment How to change the value of an array that is outside the For loop, from inside the For loop
Have you tried?
Apr
2
comment How to change the value of an array that is outside the For loop, from inside the For loop
My question/point stands: Do you want eigenvect to be different once you've changed H? If so, you need to put Eigensystem[H] inside the loop (but you don't need to define H itself inside the loop). Or do you just want there to be a new H once you've finished the loop? In that case, you can just alter H itself without calling Eigensystem.
Apr
2
comment How to change the value of an array that is outside the For loop, from inside the For loop
It's not clear what you want: do you mean that eigenvect[] will change on each iteration? In that case, you need the Eigensystem[H] statement inside the loop, too.
Feb
16
awarded  Citizen Patrol
Jan
24
comment Definite integral takes a very long time
Cosmology! (It might actually be useful to allow z>=-1 so it's useful to the future as well as the past...)
Jan
22
comment Simplification of double symbolic sums containing a DiscreteDelta without explicit summation range
@Paco, use backticks for code!
Jan
21
revised How can I efficiently enter multiple instances of data?
edited body
Jan
19
answered How can I efficiently enter multiple instances of data?
Dec
27
revised Make mathematica treat $e_i^2$ as numeric
"threat" -> "treat" and "numerics" -> "numeric"
Dec
27
suggested suggested edit on Make mathematica treat $e_i^2$ as numeric
Dec
22
revised What causes this strange convergent sum?
added 98 characters in body
Dec
22
comment What causes this strange convergent sum?
Infinite sums are like integrals: even seemingly simple expressions can have complicated answers, and similar expressions can have very different answers.
Dec
22
awarded  Teacher