Reputation
59,020
Next tag badge:
144/100 score
18/20 answers
Badges
2 90 230
Newest
 Nice Answer
Impact
~794k people reached

35m
comment Evaluating Real and Imaginary parts in a dispersion equation via ContourPlot
There isn't enough information to be certain about the issue. What are the "strange features"? Please post a minimum working example.
45m
comment Simplest use of transpose given a vector and a matrix
I think belisarius and @rcollyer are both right - it just depends on what you want to do with the result. Most likely, you want a pure scalar and therefore need just what rcollyer stated.
1h
comment Dipolar magnetic field lines inside a cylinder
Oh, that's just a special case where the solution zStart1 hits a degenerate angle with a removable singularity. You can easily avoid that by choosing slightly rotated angles: phi[n_]:=(n-1) 2 Pi/NCourbes+.001.
2h
comment Dipolar magnetic field lines inside a cylinder
I added a modification of your own code and a fix for version 7 that should make my own code work for you, too.
2h
revised Dipolar magnetic field lines inside a cylinder
Added code closer to the original
2h
revised Dipolar magnetic field lines inside a cylinder
Fix for version 7 inaccuracies
3h
comment Dipolar magnetic field lines inside a cylinder
Ah, so perhaps version 7 has trouble recognizing the condition that is supposed to stop the integration when the cylinder radius is exceeded. What if you change the line "StoppingEvent" -> ... to (x^2 + y^2 + z^2 < omega^2 || x^2 + y^2 > 1.1) - i.e. the last condition is a radius of 1.1, not 1?
4h
comment Dipolar magnetic field lines inside a cylinder
I'll look into it. First, could you replace ParallelTable by Table in the fieldLinePlot function?
13h
comment Dipolar magnetic field lines inside a cylinder
@Guesswhoitis. Cham was already using StoppingTest in the original code, so I played it safe and used that because it must work in the version he has... in fact, this old form also still works in version 10, it just gets red syntax highlighting. So Method->{"EventLocator"...} is kind of overkill if you just want to stop the integration.
13h
comment Dipolar magnetic field lines inside a cylinder
@Guesswhoitis. That's a third method that also still works (I just don't recall if it works in version 7). Anyway, WhenEvent seems to be the modern route because it even has a predefined action "StopIntegration".
13h
revised Dipolar magnetic field lines inside a cylinder
getting stopEvent from option in held form corrected
14h
revised Dipolar magnetic field lines inside a cylinder
Unnecessary debug line deleted
14h
comment Dipolar magnetic field lines inside a cylinder
I updated the answer with a fix for the older versions of Mathematica - hopefully this will work (I can't test on version 7).
14h
revised Dipolar magnetic field lines inside a cylinder
Fix for earlier versions, also added Hold on options
19h
comment Dipolar magnetic field lines inside a cylinder
@Cham Right, the WhenEvent command doesn't exist in version 7. I can change it - but won't have time until a few hours from now. Maybe you can adapt your own code - the central ingredients are tangentCondition and zStart1, zStart2.
20h
revised Dipolar magnetic field lines inside a cylinder
added 709 characters in body
20h
answered Dipolar magnetic field lines inside a cylinder
1d
comment Is there a way for accuracy backtick notation to accept variable inputs?
@MichaelE2 That's right, but it looked like he wants something that can be stuck into individual parts of a longer expression, whereas SetAccuarcy is more "volatile" (i.e., has to wrap the entire expression).
1d
comment Is there a way for accuracy backtick notation to accept variable inputs?
How about using a simple factor, as in acc=1``20;12*acc?
1d
comment MatrixExp of a complex matrix of size about 10000 by 10000
Inserting a projection is not very different from applying the matrix to (a set of) vectors. Since you have a time parameter t, I'm now guessing that your problem can be rewritten as a partial differential equation (where the large dimension just expresses a discretization of some continuous degree of freedom). But there's not enough information to go on.