Reputation
11,186
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
20 47
Newest
 Nice Answer
Impact
~102k people reached

2d
comment Why different output is obtained for the same code (Mathematica 10.1)?
@Misery: well, then it looks like a different problem. Unfortunately I also don't see the problem so it is difficult to help...
2d
comment Why different output is obtained for the same code (Mathematica 10.1)?
How long does that Simplify take on your computer? If your computer is very slow it could happen that you run into the TimeConstraint that is set for Simplify when evaluating the first time. Following evaluations will then take advantage of cached intermediate results and get further in the evaluation and thus return a different result. If that's the case I think it is a known problem but not "broken-code"...
2d
comment Unexpected behavior of WhenEvent in NDSolve?
I have added my comment as an answer, so if you want you can accept it and make that question disappear from the unanswered list...
2d
answered Unexpected behavior of WhenEvent in NDSolve?
2d
comment Unexpected behavior of WhenEvent in NDSolve?
great, I wasn't sure but as I struggled about this myself it was an easy guess :-)
2d
comment Unexpected behavior of WhenEvent in NDSolve?
I'm not sure what you are doing, but for me y[4.4]/.sol returns an InterpolatingFunction which is valid from 0.01 to 5.14 and that seems to be the value where y' becomes zero as desired. You can of course still plot it but for values larger than x=5.14 but then only an extrapolation of that InterpolatingFunction is plotted, nothing that has anything to do with the real solution. I'm not sure why they changed the older behaviour where you'd have seen a bunch of warning messages but in any case you should check the end point before plotting when using "StopIntegration"...
May
19
comment Running bits of code in a separate kernel
a quick fix which will not solve your problem but probably makes it less problematic could be to set $HistoryLength=0 which will probably help in decreasing the memory consumption. For running in extra kernels you could have a look at the parallel functionality. If you use that with only one parallel kernel and do CloseKernels once in a while that probably is the most convenient interface to do what you want. For your application using more than one kernel in parallel would probably also make sense. It would certainly also be possible to start a kernel with lower level functionality...
May
11
comment NDSolve computes wrong solution?
I get the same result, looks like a bug to me, most probably in the relatively new FE code. It is just a suscpicion, but Method->"MethodOfLines" complains that it can't handle that case of boundary conditions (which I think is also reasonable) which only leaves Method->"FiniteElement". I'd report it to WRI. Probably just a simple sign problem as you can get what looks like the desired result when switching the sign in the boundary condition to -5*t :-)
May
9
comment How can export into an .XYZ file using decimals without scientific notation?
there is some documentation for the XYZ format import/export. I have not studied it in detail, don't know the XYZ format and format documentation is generally rather poor, but I think you will need at least using string instead of symbols ("VertexTypes" vs. VertexTypes) and als use "Rules" for the element description. I would play around with the examples in the documentation (/ref/format/XYZ in the documentation), that usually gives you a feeling about what works...
May
8
comment Importing large data without using Import
concerning memory: do you know about $HistoryLength=0? if you don't do that Mathematica will remember all output you ever generated in a session. concerning import: if changing the simulation, I'd consider another format for your files, text is just not a very good encoding for numeric data. Other than that, you might find this question and answers to it helpful. If sticking with text, you can read lines with ReadList and type String instead of BindaryReadList as in the answer...
May
8
comment Importing large data without using Import
and the code writes the presumably numeric results into text files? Can you change that and make that code save something else? It certainly is possible to read in these text files, but it might in total consume more time than changing the data format (in case that is possible)...
May
8
comment Importing large data without using Import
do you generate the data with mathematica and reread it with mathematica? If yes, then use Dump and Get as you suggested (although I think Export[filename,expression,"MX"] is slightly cleaner). Anyway, if you want the data to be accessable with other programs you could also look at specific file formats like HDF5 which are at least partially supported from Mathematica and will be a much better choice to store large numeric arrays, even a whole collection in one file...
May
5
comment Is Mathematica intended to be used to do lengthy algebraic clculations?
is your problem that it takes you longer to write the input for Mathematica to do the calculation or that Mathematica itself is slow? Mathematica is definitely used for algebraic calculations which are too much work to do by hand in any chance (e.g. feyncalc), but it needs some experience and effort to make it perform these efficiently. For very demanding calculations, you might have to switch to specialiced packages though...
Apr
26
revised Exporting multiple arrays in a single HDF5 file in Mathematica 7
added note about version 10.0.2 also working
Apr
22
comment Is there a way to profile Mathematica code in batch mode?
I think you should follow Szabolcs advice and reformulate the question and especially the title. Running profiles in batch might attract a lot more people who might be able to help you...
Apr
19
comment Alternatives to Mathematica
I think that there is a decent list of computer algebra systems in wikipedia and such a list might better be curated there than on a QA site as this one. Mathematicas strength is its generality and how it integrates all those very different things. Probably none of the others can beat it in that respect, but for almost every specialiced task you'll most probably find a specialiced tool that does a (much) better job for just that task than Mathematica, especially if that task isn't explicitly of symbolic nature...
Apr
15
comment Comma issue from number point in csv export!
@SjoerdC.deVries: when you use comma as the number-point character you actually have to use something else to seperate fields, and using semicolon is AFAIK the quasi-standard then. This is very common on computers set to German language settings as there a comma is the default for the number-point character...
Apr
15
comment Function in Mathematica 10.1, but not in CDF Player 10.0.2
the corresponding player versions ususally are made available a few months after a new mathematica version is available, so that seems to be WRIs strategy. I don't know why they do it that way, it makes the whole concept of CDFs somewhat questionable unless you stick to that version for which players already are available (which I usually do). You'd then use the newest mathematica version only to prepare stuff you want to deploy for the upcoming players...
Apr
15
comment Function in Mathematica 10.1, but not in CDF Player 10.0.2
@abwatson: soory, I didn't see your comment, if you use the @ notation, a message will displayed for the user you are addressing so you are more likely to get an answer. "define only for older version" could either be done checking $VersionNumber and $ReleaseNumber or, and I think that would be the better solution by checking if the symbol already exists using NameQ: If[Not@NameQ["MinMax"],(*define it...*)];
Apr
13
comment How do I interrupt (abort) a computation in Mathematica?
unfortunately often the kernel will eat up all of your memory and it might happen that your system becomes unresponsive (which shouldn't happen with a modern OS, but of course still does...). To avoid that, you can try MemoryConstrained and TimeConstrained which will abort the calculation when the given limits are passed even when you can't interact with your computer anymore. This is not bullet proof AFAIK but has saved me from needing to switch off an unreponsive computer several times...