5.14 Tuesday, September 27, 2016

================================== 
Top new questions this week: 
==================================

[Should I always be using Module in functions unless I explicitly want global variables?] http://mathematica.stackexchange.com/questions/126877/should-i-always-be-using-module-in-functions-unless-i-explicitly-want-global-var

I define functions a ton. In the past, I’ve mostly just defined my functions like:

myFunc[var1_]:=( 
  var2=var1^2; 
  Return@var2; 
)

And I haven’t run into too much trouble. If I wanted to be really ...

- asked by YungHummmma (15 votes), answered by WReach (18 votes)

—————————-

[Why this real integral yields imaginary results?] http://mathematica.stackexchange.com/questions/127301/why-this-real-integral-yields-imaginary-results

Integrate[(y - y^2 + x - x^2 + 2*x*y)/(1 - x - y),{x,0,1},{y, 0, 1}]

The above integral yields -1-4I/3 in Mathematica. Since the integrand is real (although divergent at some points), how does ...

- asked by Chong Wang (12 votes), answered by bbgodfrey (12 votes)

—————————-

[Would it be a good idea to use Failure and FailureQ in own code] http://mathematica.stackexchange.com/questions/126908/would-it-be-a-good-idea-to-use-failure-and-failureq-in-own-code

Since version 10 (at least 10.0.2 but I think 10.0.0) there is Failure and since version 10.2 there is also FailureQ. As often the documentation is somewhat vague and says "Failure is generated by ...

- asked by Albert Retey (12 votes), answered by Leonid Shifrin (9 votes)

—————————-

[Display grayscale image as 3d plot] http://mathematica.stackexchange.com/questions/127210/display-grayscale-image-as-3d-plot

How to build 3d plot of grayscale image where x,y - pixel coordinates, z - pixel intensity?

I tried ListPlot3D[ImageData[image]], but ImageData gives just intensities. I suppose a possible solution ...

- asked by red1ynx (10 votes), answered by Kuba (11 votes)

—————————-

[Automatically draw ellipsoids around groups of select points] http://mathematica.stackexchange.com/questions/126899/automatically-draw-ellipsoids-around-groups-of-select-points

Suppose you have a ListPlot, and there are certain points you wish to emphasize belong to particular group. I would like to make a function that automatically draws an ellipsoid around a select group ...

- asked by SumNeuron (10 votes), answered by Szabolcs (11 votes)

—————————-

[Enter colors directly into notebook?] http://mathematica.stackexchange.com/questions/127245/enter-colors-directly-into-notebook

In Mathematica notebook interface, you can evaluate:

In[1]:= Black

and you get a colored squared representing the color. Then I can copy and paste this color square and use it as input, like so:

...

- asked by becko (9 votes), answered by WReach (10 votes)

—————————-

[Large Dataset query fails if column contains Missing] http://mathematica.stackexchange.com/questions/126851/large-dataset-query-fails-if-column-contains-missing

In version 11.0 (Win 8.1 Pro) a query on a large Dataset for a column that contains Missing fails most unceremoniously.

With

dsTest = AssociationThread[{"a", "b"}, 
     If[Last@# == 10000,  ...

- asked by Edmund (9 votes), answered by JasonB (7 votes)

================================== Greatest hits from previous weeks: ==================================

[Is there an open source implementation of Mathematica-the-language?] http://mathematica.stackexchange.com/questions/4454/is-there-an-open-source-implementation-of-mathematica-the-language

I’ve seen questions before such as "What is the best open-source equivalent for Mathematica?", but that specific question (and that line of inquiry in general) cares more about the computer algebra ...

- asked by sblom (81 votes), answered by Simon (63 votes)

—————————-

[What are the most common pitfalls awaiting new users?] http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by Dr. belisarius (341 votes), answered by Michael E2 (195 votes)

================================== Can you answer these? ==================================

[Enable file completion by default?] http://mathematica.stackexchange.com/questions/127203/enable-file-completion-by-default

File completions work for Import and Get but not with << syntax as you can see:

Is there some way to enable this?

- asked by M.R. (2 votes)

—————————-

[Trouble with NIntegrate strategy "DoubleExponentialOscillatory" when trying to ListPlot the results] http://mathematica.stackexchange.com/questions/126832/trouble-with-nintegrate-strategy-doubleexponentialoscillatory-when-trying-to-l

Can someone point me in the right direction? I ’ve been puzzling with this for weeks...

I have a huge function (of the form f(y,)sin(x) ) to integrate in in region (0, Infinity) and I use ...

- asked by George13 (1 vote)

—————————-

[Using an umlaut for a keyboard shortcut] http://mathematica.stackexchange.com/questions/126909/using-an-umlaut-for-a-keyboard-shortcut

How can I define a keyboard shortcut based on an umlaut like ü?

KeyEvent in KeyEventTranslations.tr doesn’t seem to register umlaut based keyboard inputs. For example, after adding

...

- asked by Karsten 7. (3 votes)