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

1d
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...
Apr
12
comment Function in Mathematica 10.1, but not in CDF Player 10.0.2
if your MinMax is doing the same thing as the new 10.1 MinMax you could define it only for the older version, or probably more correctly if it isn't defined already. If they do different things, you'll need to rename your MinMax and Nassers comment fully applies...
Apr
11
revised Package Loading: How to get rid of Needs::nocont?
added 1127 characters in body
Apr
11
answered Package Loading: How to get rid of Needs::nocont?
Apr
11
comment CountryData fails for some tags and properties
I think you should try to remove the content of Paclets/Repository but not the directory itself. Then before doing anything else do RebuildPacletData[]. After that try CountryData again, it should now download the matching paclet version which will take some time. If this does not work I'm out of ideas, I don't know about the stuff in Temporary, never touched that. On my system there is CountryData-10.0.73, 10.0.39 and the 9.0.64 that you also see. I don't know but would think that this could have to do with the fact that I'm still using version 9 and have been using 10.0.1 and 10.0.2...
Apr
10
comment Package Loading: How to get rid of Needs::nocont?
Can you explain why using Get["TestApplication`TestPackage`"] in init.m and renaming your encoded files to TestPackage.m instead of TestPackage-encoded is not good enough? It seems to not make much sense to use Needs in your TestAppliation`init.m as that will be read only once when loaded with Needs["TestApplication`"] anyway, so there is no gain in using Needs there over Get. I also don't understand why it would be a problem when the context is not human readable within an encoded file, Mathematica will happily load it anyway...
Apr
9
comment CountryData fails for some tags and properties
Are you still getting the same error messages? A brute force alternative to guarantee you have a clean state would be to delete all 9.x files/directories in Paclets/Repository and then do RebuildPacletData, but probably what I have in mind is not your problem...
Apr
9
awarded  Nice Answer
Apr
8
comment CountryData fails for some tags and properties
have you tried RebuildPacletData[]? I think that problem has already come up, there seems to be a problem when updating from v9 to v10 but I can't find the question for the moment...
Apr
8
comment A too complicated lookup
depending on how you use that and how important lookup speed is for your application I think you should also consider Picketts solution: if you build the Association once then the lookup of keys in it will be the most efficient way to get at the desired data...
Apr
8
comment A too complicated lookup
I think that you should mention that if the OP wants to search for several keys he could do lookup=AssociationThread[nm->ln] and then look up a given key with lookup[searchKey]. That way one would avoid the relatively expensive build of the Association and once that has been build using it would AFAIK be the most efficient way for such lookups.
Apr
8
comment A too complicated lookup
I just made some comments to my solution: I now believe that my solution (by luck) might do what the OP wanted, but yours correctly does what his example code is doing. Concerning speed I think we compare apples with oranges as what my code does is actually something less difficult than what yours does...
Apr
8
comment A too complicated lookup
@eldo: My version only works if keys are unique and the length of ln and nm are equal and "corresponding" means that the nth element of ln corresponds to the nth elment of nm. This is for what the Pick solution works, if it is what you need then thats fine. Your code (and Taikis solution) actually wouldn't need the key list nm as you just select the entry which starts with the same characters as the search string which for the given example data (ln and nm) happens to be the same thing, but could be something very different for other cases...