Reputation
61,050
Next tag badge:
121/100 score
19/20 answers
Badges
2 94 232
Newest
 Good Answer
Impact
~818k people reached

Aug
4
comment Dipolar magnetic field lines inside a cylinder
That's a trivial case that you can surely work out yourself. It corresponds to no tilt at all, which is not what you wanted in the question.
Aug
4
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.
Aug
4
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.
Aug
4
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.
Aug
4
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.
Aug
4
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?
Aug
4
comment Dipolar magnetic field lines inside a cylinder
I'll look into it. First, could you replace ParallelTable by Table in the fieldLinePlot function?
Aug
4
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.
Aug
4
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".
Aug
4
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).
Aug
4
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.
Aug
3
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).
Aug
3
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?
Aug
3
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.
Aug
3
comment MatrixExp of a complex matrix of size about 10000 by 10000
You should really state your problem and your ultimate goal by giving specific Mathematica code to reproduce the issue. If you tell us what you really want to achieve, it could be that you'll get a completely different answer that makes your large matrices unnecessary. As it is written, the question cannot be answered except by blind guessing, which is unlikely to be useful.
Aug
2
comment How to get the desired (equivalent) answer from Integrate?
Closely related: Order of integration changes output of indefinite multiple integral in Mathematica 7
Aug
2
comment intermediate steps of a Mathematica operation
Related: Showing steps for TrigExpand. But I think this question is not related to an actual issue encountered while programming in Mathematica. Perhaps you should show what you've already tried.
Aug
2
comment Generating and Imaging of the water molecules with Graphics3D
Closely related: Using ChemicalData to make molecule graphics. It's probably a duplicate (I can't find anything that makes water fundamentally different.
Aug
1
comment Implementing Picard's Iteration for solving ODEs
@Guesswhoitis. Happy to hear that you found a good use for this...
Jul
31
comment Derivative of vector dot product with respect to a vector
OK, then I initially misunderstood your question. It's not a duplicate of the Q I linked earlier.