Should I always be using Module in functions unless I explicitly want global variables?
Why this real integral yields imaginary results?
Would it be a good idea to use Failure and FailureQ in own code
Display grayscale image as 3d plot
Automatically draw ellipsoids around groups of select points
Enter colors directly into notebook?
Large Dataset query fails if column contains Missing
Should I always be using Module in functions unless I explicitly want global variables?
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? 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 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 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 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)