Reputation
59,482
Next tag badge:
115/100 score
18/20 answers
Badges
3 123 240
Impact
~561k people reached

2d
comment Undeclared Identifier error in Compile
...In your example, it gave a cryptic error. I couldn't even reproduce your error on my Linux machine. Here, the Kernel just crashed. Therefore, I can only tell you how to do it right and not, what exactly went wrong in your specific case.
2d
comment Undeclared Identifier error in Compile
Beside the error in PointIsWithinCircleWidth that I pointed out, you cannot simply call a compiled function from within another compiled function and expect that it is properly included (injected). The combination of With and the option "InlineCompiledFunctions" is important because otherwise when you call your compiled function, it calls back to Mathematica which is not what you want. You want a compiled function to be fast compiled code only without callbacks to the Mathematica Kernel. The real problem was that with compilation target "C" this produced not only slow code...
Aug
23
comment Memory usage of compiled function: C vs WVM
Player 3 has joined the game: Creating a C-library from a compiled function. Here is the comparison and you can see the whole notebook by evaluating Import["http://goo.gl/NaH6rM"]["http://i.stack.imgur.com/GTpLl.png"] If we only could trust that MaxMemoryUsed is working correctly..
Aug
21
comment How to stop a summation when a variable is small enough?
@Samuel Question: Can you reduce your function to a very small example that shows the same error when using NSum? Then we might be able to inspect in detail what goes wrong. Question 2: Is your function numerical at m=1? Have you tried yourself?
Aug
21
comment Histogram and Random Lists
Btw, I'm voting to close this question because it can really easily be found in the documentation.
Aug
21
comment Slider Size Problem
Well, you could have edited your question yourself :-) I included it.
Aug
21
comment Slider Size Problem
You should add your operating system, because on Linux this does not appear at all. My sliders don't even look blue. See here
Aug
18
comment How can I convert the solution I get from the DSolve to something I can use?
@SeanPatrick It's because I used Plot and not your code and I mentioned that I changed some things in your manipulate, but I'm sure you get the rest yourself. The question was about using s in a Manipulate.
Aug
18
comment How can I convert the solution I get from the DSolve to something I can use?
As far as I can see, you never use the solution from DSolve! The solution itself is stored in the variable s. I don't see s in your code below the DSolve call.
Aug
18
comment How to use Compile to generate an $n×n$ array using $n$ tensors with both Real and Integer element
@xzczd That was left as exercise for the attentive reader. Fixed.
Aug
18
comment Use Compile to improve performance
@All I have explained the issue that Michael found very detailed in the end of my answer.
Aug
17
comment Use Compile to improve performance
Yes, edit your question please. You see an edit button directly under the question. You could re-use some of the text-parts and only correct the code.
Aug
17
comment Use Compile to improve performance
Something is wrong here. You use the symbol g for both, the global matrix and a function g[v_,w_]? This doesn't work. Haven't you seen all the error messages that appear when you evaluation your example? Can you please provide a complete, working example for uncompiled code?
Aug
17
comment Shading between polar graphs
@David One of the rare cases where the Linux version works correctly. I updated my answer.
Aug
17
comment Shading between polar graphs
@David Why would I need it? For me on Linux with Mathematica version 10.2 it looks like this which is except of the default colors exactly what the OP asked for.
Aug
17
comment Shading between polar graphs
@David Fixed it. The behavior-change is not documented
Aug
12
comment Is there an issue tracker for already reported Mathematica bugs?
@ilian Is that energy not better spend convincing Stephen Wolfram to finally implement such a public system at WRI? I mean this mathgroup post is over 6 years old and has the same suggestions. Now in 2015 we finally arrived at a point where we are misusing SE as publicly available bug-db for Mathematica. Is there really nothing we can do to solve the underlying problem?
Aug
12
comment How to obtain the value of a single symbol with mathlink
@highsciguy OK, then I completely misinterpreted the reads the value part. Question: In your example you have send mysymbol for evaluation to Mathematica, but you don't read the returning packet. Why? You should use WSCheckFunction and WSGetIntegerList for that. Please read here.
Aug
9
comment Recursive list contruction
Your definition doesn't work. Maybe something went wrong during the copying. You can find here another short implementation for your remove first problem. The approach I showed you uses one of the strengths of Mathematica: Pattern matching. This fits your situation better, because for implementing different cases that depend on the structure (like testing for an empty list), pattern matching is better readable than a nested If. Basically, every definition line shows one specific situation that can happen. Very readable once you got used to it.
Aug
9
comment 3D-Plot of a list of complex numbers and a list of real numbers
@hoyast Try to find out why you can apply Re and Im on lists (lookup Listable) and how easily you can re-arrange columns and rows if you think about it as transposing a matrix (or a tensor in general). Try ListPlot3D[Transpose[{Re[list1], Im[list1], list2}]], but don't just use it. Understand it.