Reputation
74,423
Next tag badge:
604/400 score
77/80 answers
Badges
5 185 420
Impact
~879k people reached

5h
revised How can I improve Mathematica's resolution on a macbook retina display?
deleted 355 characters in body
5h
revised How can I improve Mathematica's resolution on a macbook retina display?
edited tags
7h
comment Simplest use of transpose given a vector and a matrix
x is a vector, not a matrix, thus transpose makes no sense. x.A.x gives you what you need. Mathematica supports arbitrary dimensional tensors. Compare with MATLAB, which simply doesn't have vectors, only $1\times n$ or $n\times 1$ matrices which are sometimes called "row vectors" or "column vectors", even though they're really matrices, i.e. rank-2 tensors. Mathematica works with fully general tensors of any rank instead of just matrices, thus there's no need to bother with row or column matrices. Plain vectors (rank-1 tensors) will do.
8h
comment Possible memory leak when importing JSON
However, this is not the reason for the extreme memory usage the OP sees. He said that the value reported by MemoryInUse[] doesn't even increase.
10h
awarded  Favorite Question
14h
comment Extracting parameters from a fitted function
Old question again, sorry ...
14h
comment Extracting parameters from a fitted function
I'm a bit confused by your description. When running NonlinearModelFit, the result should be a FittedModel object, not something in the form of {value1, value2, ...}. Can you clarify what you get? Once you do have a FittedModel objects (let's say stored in the variable fm), evaluating fm["ParameterTable"] should probably be quick. If it's not, can you give a short but complete example that reproduces the problem? If you need to retrieve the parameter values for programmatic use, try "BestFitParameters" instead of "ParameterTable" (which is for visual inspection).
15h
comment Injecting a sequence of expressions into a held expression
But the result is not that expression, it just looks like that expression. It cannot be re-used programmatically, and the produced cell cannot even be edited manually within the front end, then evaluated, without producing errors.
16h
revised Possible memory leak when importing JSON
edited title
16h
comment Mod[1.2, 0.2] is not equal to zero
Could you please take a look at this memory leak, just in case the OP doesn't send a bug report?
16h
revised Possible memory leak when importing JSON
edited tags
16h
answered Possible memory leak when importing JSON
16h
comment Possible memory leak when importing JSON
How exactly are you measuring memory use? Do I understand it correctly that MemoryInUse[] and some other method (task manager?) don't agree about whether memory usage is growing?
16h
revised Possible memory leak when importing JSON
added 3 characters in body; edited tags
16h
comment Function assigning loop misses a beat
@polymachine Sorry, I don't quite understand your last comment. Also, this is not the right syntax for ListPlot* functions. They should take a single argument only. Can you post a new question and explain in a bit more detail what you need to do, then ask about how to do it without running into this problem with floating point comparisons? Alternatively you can also edit this question (and fully rewrite it to it can be reopened), but since this is already marked as duplicate, I think it may be better to just post a new one with a different focus.
17h
comment Function assigning loop misses a beat
Perhaps you could exploit == somehow to avoid the problem. But it would be easier to answer this if you gave some more details about why you nee to define f this way. I would go for trying to avoid floating point comparisons in the first place, if possible ...
17h
comment Function assigning loop misses a beat
@polymachine How to avoid this problem? Well, in general, comparing floating points numbers using equality is generally a bad idea in any language. But Mathematica tries to make things a little easier for us, so it has a high tolerance for comparisons, by default. Let's say a=Table[n,{n,0.1,0.2,0.025}][[4]]. Now MatchQ[a,0.175] returns False because it uses exact, bit-by-bit matches. But a == 0.175 returns True because == has some tolerance.
17h
comment Function assigning loop misses a beat
@polymachine Mathematica can use arbitrary precision arithmetic, but won't do so unless you instruct it to. If Precision[someNumber] tells you MachinePrecision, then someNumber is a machine precision number with about ~15 digits and no precision tracking. Machine numbers are much faster to work with as the CPU supports them directly.
17h
comment Function assigning loop misses a beat
This is not a bug. It's just how machine arithmetic works. What Every Computer Scientist Should Know About Floating-Point Arithmetic is a frequently suggested reading. Part of the reason for this behaviour is that the machine numbers are represented in binary internally, which means that numbers such as 0.1 or 0.025 are no exactly representable, the same way as 1/3 = 0.33333... is not exactly representable with a finite number of digits in decimal.
18h
comment Function assigning loop misses a beat
Please do not use the bugs tag when posting question. This is a specially handled tag that should only be added by someone else than the original poster (by agreement), after the community has confirmed the bug.