41,134 reputation
15107213
bio website
location
age
visits member for 1 year, 4 months
seen 11 mins ago
stats profile views 3,762
1:eJxTTMoPCtZiYGAwtEr1qggJ8c0PcC6Nyo10d8yvzAvPL8zM8jUoLvHxCXR19DMudndytLUFAIyYD9M=

Insanity is doing the same thing over and over again and expecting different results. — Michael Scott

Be insane if absolutely necessary.


May
7
comment How to make a notebook not savable?
Yes, documentation notebooks and default stylesheets have Saveable -> False
May
7
comment How to make a notebook not savable?
@Problemania It is possible to modify the menu items as well, but it is global and it would make for terrible UX and I'd hate if someone were to design a package/application that disabled "Save As" for me. So why don't you actually explain more on why you require this? There are possibly other better ways of achieving what you want
May
7
reviewed Close why there is a small imaginary part
May
6
reviewed Close Scaled ColorData Function
May
6
comment How to populate a table using a rule replacement
@olliepower I made a typo in writing it here — I had element instead of elements. I've fixed it now; if you copy the above and try it, it should run correctly
May
6
revised How to populate a table using a rule replacement
fix typos
May
6
comment How to highlight a string pattern?
Ok, since Silvia's comment solved your problem and that is exactly one of the solutions in the linked post (which is very similar to this one), I'm marking it a duplicate. Please let me know if this is not the case (and why)
May
5
comment How to highlight a string pattern?
In general, you'd be better off using Row to join styled strings, and this is answered in mathematica.stackexchange.com/q/10990/5. Also see WReach's answer on converting to StandardForm and then using StringJoin
May
5
comment joining lists based on content
@mag That's just to strip one outer {} from an inner expression (see what happens to {l, m, n...} without that rule). I made a specific rule so that other genuine double lists (if any) won't accidentally get stripped.
May
5
answered joining lists based on content
May
5
comment joining lists based on content
@mag Ok, that clears up most of it; a couple more: 1) Are all the sets present in both lists or can some be missing? 2) Do you care about the order in which the sublists are present?
May
5
comment joining lists based on content
Ok. Assume list A = {{a, b, c, {d,e,f}, g, h}, {l, m, n, {o,p,q}, r, s}, {u, v, w, {x,y,z}, a, b}} and list B = {{a, b, c, {d,e,f}, i, j}, {u, v, w, {x,y,z}, d, e}, {a, b, c, {d,e,f}, k, l}, {q, r, s, {o,p,q}, u, v}} — Now, do you want the {a,b,c... in A to be combined only with the first {a,b,c... in B (same position) or with both instances in B? What to do with elements that don't match (e.g. {q,r,s... in B)? Discard them or include them as is?
May
5
comment joining lists based on content
So you want to line up corresponding sublists of list1 with those of list2 and join only if the a,b,c... are the same? Or do you want to search and gather from just a single list?
May
5
comment How to populate a table using a rule replacement
@olliepower So does it work now or do you still get an error?
May
5
comment How to populate a table using a rule replacement
@olliepower I don't get that error. You must not have defined element as I've done it.
May
5
comment Calculate variance of random walk?
@dabd I feel this was closed because it wasn't immediately obvious that you're asking how to do it in Mathematica (I know you mentioned it, but it was in the very last line). People might have thought you accidentally posted a question meant for Mathematics here. I've reopened it and rephrased your question slightly to indicate the Mathematica part of it upfront. As to your question, Silvia's suggestion is a good start — if your steps were unit sized, then the variance can be found as Variance@RandomWalkProcess[p][t], but since you have different step sizes, it needs a little more finesse
May
5
revised Calculate variance of random walk?
deleted 7 characters in body; edited tags
May
5
comment Calculate variance of random walk?
@MichaelE2 I'm curious, since I don't see it immediately — why is this off-topic? It seems to be clearly about Mathematica, or rather, trying to derive the variance symbolically using Mathematica...
May
4
comment Image of first quadrant under $f(z)=(z+i)/(z-i)$
I fully understand how that must be... I too have gotten quite used to the uploader and grumble when I have to take the long route :)
May
4
revised Mathematica for Computer Scientists
added 219 characters in body