3,842 reputation
1829
bio website
location
age
visits member for 2 years, 8 months
seen 3 hours ago

Dec
26
revised How to generate a random snowflake
deleted 1 characters in body
Dec
26
answered How to generate a random snowflake
Dec
20
comment Module that finds the sum of digits of any given positive integer
@rola please see my answer to this question. it's important to understand that Mathematica's syntax is very "raw", in that there are no keywords. Module is not a keyword. it's a regular symbol/function that you could make your own version of. the important syntax is :=, which expects a pattern on the left and basically anything you want on the right. the purpose of Module is to create local variables. if you don't need local variables then you don't need Module, you can just write the expression, or e.g. f[x] := (Print[x]; x)
Dec
20
comment Module that finds the sum of digits of any given positive integer
@rola Look in the Mathematica documentation (F1 button in Mathematica), it is very useful. Total is basically the same as Plus @@ # & which is the same as Apply[Plus, #] &. The main difference, I suppose, is that Total allows you to specify the level (for example you can add up all the elements of a matrix, instead of its rows).
Nov
30
comment Pasting monospaced text into Mathematica notebook destroys aligment
maybe i'm being an idiot by bringing this up, but you can do some basic vector editing (by hand) in Mathematica
Oct
11
awarded  Announcer
Oct
9
awarded  Announcer
Sep
20
comment Raster with ColorFunction is blank when Dynamic Updating is disabled
@AlexeyBobrick Yep, I lowered the number of kernels. But I don't know if that is a general solution. As I wrote in the update, the problem appears to have something to do with the way Dynamic interacts with Rasterize, which is most likely an actual bug. Look at this thread which deals with the underlying Dynamic problem. I don't know why the number of kernels has an effect.
Sep
10
awarded  Nice Answer
Sep
10
revised Equivalent of MATLAB's “hold on” function
added 9 characters in body
Sep
10
revised Equivalent of MATLAB's “hold on” function
added 3D version
Aug
25
comment Programming Mathematica in plaintext, i.e. no formatting, non-notebook
@acheong87 you can just right-click in a Notebook and insert a Code cell, which will have standard text/formatting (same cell type as in New -> package). also check out my answer here for an example of the kinds of things you can do with a Mathematica notebook. and do try to play with Manipulate. i don't miss Vim much in Mathematica because Mathematica code is very succinct. i consider around more than 200 lines to be a large Mathematica program. you can accomplish a lot very efficiently once you get into the vibe of the language
Aug
19
comment Automate mouse clicks with Mathematica
hmm wonder why this syntax didn't occur to me. @RodLm feel free to change the accepted question
Aug
19
comment Automate mouse clicks with Mathematica
@RodLm for some reason i had assumed you were familiar with Java. to be clearer: the mousePress function expects an integer. mousePress(InputEvent.BUTTON1_MASK) works in Java because InputEvent.BUTTON1_MASK is an integer in Java. what you do with this knowledge is something i leave to you :)
Aug
19
answered Automate mouse clicks with Mathematica
Aug
19
comment Paste data into Mathematica with formatting
@Liam nah i mean right-click -> Insert New Cell -> Code
Aug
19
comment Paste data into Mathematica with formatting
i just create a Code cell, which preserves the formatting. it'd be nice if these kinds of tricks weren't necessary though. i assume Mathematica eats the formatting primarily to delete spaces, which don't mix well with the pretty-form display
Aug
17
reviewed No Action Needed Filtering elements from a list that appear only once
Aug
17
reviewed No Action Needed RSolve and “the given boundary conditions lead to an empty solution”
Aug
17
reviewed Leave Open How do I use a while-loop to find the gain of a transfer function's limit?