Reputation
74,173
Next tag badge:
603/400 score
77/80 answers
Badges
5 184 419
Newest
 Nice Answer
Impact
~877k people reached

Mar
7
comment Evaluate function of two variables using nested Do loops
@rasher Neither does the Outer-version I posted, but I wrote it this way on purpose (instead of transposing). I believe the OP wrote his function this way because he is used to MATLAB which encourages column-major thinking, while Mathematica encourages row-major thinking. In Mathematica a matrix is a list of rows, not a list of columns, so it's typically (not always) more advantageous to work with rows.
Mar
7
revised Evaluate function of two variables using nested Do loops
added 215 characters in body
Mar
7
revised Evaluate function of two variables using nested Do loops
added 2 characters in body
Mar
7
comment Evaluate function of two variables using nested Do loops
Also note the differences between vectors and matrices in Mathematica. The way you wrote this code suggests to me that you are used to MATLAB. MATLAB doesn't support vectors at all, only matrices. You can have 1 by n or n by 1 "row vector" or "column vectors". Don't use these in Mathematica. Use true one-dimensional vectors such as {1,2,3} instead of a matrix such as {{1,2,3}} or {{1},{2},{3}}.
Mar
7
answered Evaluate function of two variables using nested Do loops
Mar
6
comment Evaluate function of two variables using nested Do loops
Welcome to Mathematica.SE! Please edit your question and format the code as a 'code block' for readability. Use the (?) button at the top right corner of the editor for formatting help.
Mar
6
comment Is there a function which instantly tells you whether an element is part of a list?
For questions like this, which take a one-word answer, it's probably better if you ask in chat. Just a suggestion.
Mar
6
answered Is there a function which instantly tells you whether an element is part of a list?
Mar
6
answered MLEvaluate() Function Gives Error
Mar
6
answered How to apply a conformal map to a jpg (or other image)
Mar
6
comment How to work with Experimental`NumericalFunction?
One way to collect such objects for examination is this. It might be useful to have a temporary community wiki answer where people can share findings before a final answer is developed.
Mar
6
comment MLEvaluate() Function Gives Error
The documentation says, "MLEvaluate() is only available for use in mprep MathLink template programs.". It sounds like you are calling Mathematica from a C program, not the reverse, so you are not using a template. This would mean you can't use MLEvaluate().
Mar
5
comment Simplify rearranges equations?
@Adam Yes. I actually changed the ... to Simplify[eq] a while ago. If you reload this page, it should show up.
Mar
5
comment Open a Mathematica 9 notebook in Mathematica 8
There may be things that don't work, but this should be uncommon. The bigger problem is going to be that some of the code in the notebook won't be compatible with Mma 8. It'll show correctly, it'll be readably, but Mma 8 may not have some of the functions the code relies on. In other words: the notebook can usually be opened, but the code it contains can't always be run without modifications.
Mar
5
revised Colorize a 3D distribution of points according to density
added 559 characters in body
Mar
5
comment Colorize a 3D distribution of points according to density
@Cham It seems to me that the problem is that you are just taking the code and trying to use it without understanding what it does. Please read the code, and look up the functions you are not familiar with. After that it should be clear to you why it produces a certain result and how you can modify it. If after looking up the functions you still have questions about some details, feel free to ask, but please do make an effort do understand it on your own. The choice of binning does clearly have an effect on the result (because it effectively does some smoothing).
Mar
5
comment Colorize a 3D distribution of points according to density
@Cham Search the docs for "Blend".
Mar
5
comment Colorize a 3D distribution of points according to density
@Cham This is meant as a basic example that you can adapt to your needs, not a complete solution. All the necessary parts are there, but I expect you'll want to tweak it. You can change the colour function. If points tend to fall outside the range {-3,3}, just increase it. You'll need to look up the functions I used and understand what they do (they're not complicated).
Mar
5
revised Can I make a function which depends on several arguments which are not independent?
added 97 characters in body
Mar
5
answered Colorize a 3D distribution of points according to density