Reputation
49,189
Next tag badge:
247/100 score
19/20 answers
Badges
6 77 192
Newest
 Nice Answer
Impact
~663k people reached

Feb
1
comment Custom distribution
Hi arslan, welcome to Mathematica Stack Exchange. You've come to the right place for help but unfortunately you haven't supplied enough information for anyone to help you. The only clue about what you are trying to do is a line of code which doesn't do it! It's not even clear if you are trying to make a trivariate distribution or a univariate distribution in x with a and b as parameters. Please use the "edit" button underneath the question to add some details about your problem.
Feb
1
comment Methods for producting alternating TickLabels in a Plot?
You could save a few more keystrokes by omitting Floor from your first method
Jan
31
comment Restoring an out of focus image
I will add to Oleksandr's comment that you appear to be working with a jpeg image, so a lot of information will have been discarded by the compression algorithm. I suspect it will be impossible to get anything much better than your Sharpen result.
Jan
30
comment I define a variable as local to a module BUT then the module uses its global value! Why?
@Leonid, I was using the SE app on my phone and it hadn't updated to show your comments so my reply to Mr Wizard appears to be ignoring or disagreeing with you! I do see what you mean, Set and Rule are scoping constructs so the behaviour is consistent (though arguably undesirable), which is what I thought originally. I hope you manage to find time to write down that list of rules - it's a shame the official documentation doesn't go into the level of detail that you do in your contributions here.
Jan
29
comment I define a variable as local to a module BUT then the module uses its global value! Why?
The StrictLexicalScoping option looks useful, though I wish it were implemented as a StrictLexicalModule function rather than a system option.
Jan
29
comment I define a variable as local to a module BUT then the module uses its global value! Why?
Makes perfect sense, I hadn't properly appreciated the real issue here, that the renaming exemption should not apply to unheld constructs.
Jan
29
comment I define a variable as local to a module BUT then the module uses its global value! Why?
Isn't it another example of this? Using Module[{a, h}, Set @@ {a[h_], h^2}; a[4]] avoids the problem by "hiding" the inner scoping construct from Module
Jan
28
comment Problem with FindRoot applied to functions
Have you tried using a pattern which matches a vector of numeric values? rV_/;VectorQ[rV, NumericQ]
Jan
27
comment accessing elements of nested list
@Mr.Wizard, this is close: mathematica.stackexchange.com/questions/63989/…
Jan
23
comment For a given expression: if it appears, remove it, but if it is absent, add it
I was just looking at something similar, but using a : Longest[(-Infinity | PatternSequence[])] as the head/tail patterns
Jan
22
comment How-to convert real number into List of its digits?
@user1989, No apology necessary! It's not a rule, just a good tactic to get the best out of the site :-)
Jan
22
comment How-to convert real number into List of its digits?
@user1989, no problem. By the way it is usual here to wait a while before accepting an answer, so as not to discourage others from posting other, potentially better, answers. 24 hours is good as it gives the whole globe a chance to contribute.
Jan
22
comment ListPlot3D. Only plots about half of the data in a 3D matrix
I think this is the familiar long-standing problem with the triangulation algorithm. This is related though the "DelaunayDomainScaling" option in my answer there doesn't work in version 10. A simple workaround would be to plot the probability as a percentage (data[[All,2]] *= 100), or the population in thousands.
Jan
22
comment Why does Mathematica add Hold to the result of my user defined symbol?
You will get a better response if you post the actual code rather than an image.
Jan
22
comment Is there a CDF Player for Mathematica 10? (Yes)
I've heard that a v10 player is (hoped) to be released in the next 2-4 weeks. The delay is partly due to cloud integration. The new player will apparently bring together Free Player and Player Pro into a single install. You will install the free player and then if required you can purchase a licence to activate the Pro functionality.
Jan
20
comment How to delete more than one (specific) elements in a list
@soandos, a||c is a perfectly legitimate pattern. DeleteCases treats it just like any other pattern, e.g. DeleteCases[{a || c, a && c}, a || c]
Jan
18
comment Can a System symbol spontaneously leak into a Global namespace?
I can reproduce the error with Mathematica 10.0.2 on Windows 7. It appears that the embedded stylesheet contains $CellContext`ParentList as a spurious entry in the InputAutoReplacements list for the style cells StandardForm and TraditionalForm in the FormatType Styles section. Removing these makes the problem go away, as does changing the stylesheet to something else.
Jan
17
comment Creating a right hand in graphics3d to illustrate the right hand rule
You could probably find a 3D model online, or is that not acceptable for your application? e.g. google.co.uk/#q=thumbs+up+3d+model+free
Jan
16
comment Partitioning with constraints on subsets
This is fantastic. It'll take me a while to work through the code and understand the algorithm! The speed is remarkable, 4 times faster than a reworked version of Martin's code. Thanks very much.
Jan
16
comment Partitioning with constraints on subsets
This is great, thanks. Just the sort of thing I was hoping for. It seems a fraction quicker if we sort the parts to put the longest ones first: parts = Reverse@SortBy[parts, Length] - I think this reduces the number of calls to f. There is also a slight gain from using Select instead of Cases in f.