Pinguin Dirk
Reputation
5,436
Next privilege 10,000 Rep.
Access moderator tools
 Nov22 reviewed Close Best method to do a List Plot of two series with the same x-Axes Nov22 reviewed Close How to insert trigonometric functions into matrices' vector components? Nov21 comment Conditional Table not really answering your question, but avoiding Table(you could specify r and s in the same table anyway), you could generate the RandomInteger directly and apply the condition on the pairs, e.g. like: If[#1 > #2, "a", "b"] & @@@ RandomInteger[100, {100, 2}] Nov18 reviewed Close How do I determine the maximum value for a polynomial, given a range of x values? Nov18 reviewed Close Covariance of a P x M x N matrix Nov18 reviewed No Action Needed Parse website data that requires interaction with a form (POST) Nov17 revised Seek a quick way to bring standard order back to original after Complement added 4 characters in body Nov17 comment Seek a quick way to bring standard order back to original after Complement @Nasser: sorry, I am on weekend-mode :) And actually, not sure if it's an exact dupe - but close enough I'd say Nov16 revised How to find the longest matching sublists in a list added 152 characters in body Nov16 answered How to find the longest matching sublists in a list Nov13 comment Manipulating List @m_goldberg: thanks - I guess I'll keep it, as I think the difference will be rather small and as nobody mentioned that b is sorted. But thanks for the input! Nov13 answered Manipulating List Oct23 answered Missing something in my input for CountryData dependencies Oct22 comment Refer to next element of list when iterating using Map @AlexeiBoulbitch: no problem at all! I am glad I wasn't the only one with that idea (see the last sentence in my comment) :) all good! Oct22 comment Refer to next element of list when iterating using Map @ChrisDegnen: pretty much my comment above :) Oct22 comment Refer to next element of list when iterating using Map I tend to use Partition in these situations, like (1 + #1 + #2) & @@@ Partition[{a, b, c, d}, 2, 1] or MapThread[(1 + #1 + #2) &, Transpose@Partition[{a, b, c, d}, 2, 1]]. I hope somebody will show a smarter way here... Oct21 comment Finding specific compositions of an Integer @LeonidShifrin: don't base it on my opinion alone, your explanation is great as it is - it just took a bit till I got my head around the accum (I just had to work an example, further expl. wouldn't change that, I guess) Oct21 comment Finding specific compositions of an Integer ... it took me longer to understand how you exactly do it than to write my answer. Big +1. Oct21 comment Finding specific compositions of an Integer ok, well, you will definitely like @LeonidShifrin's answer then! Oct21 answered Finding specific compositions of an Integer