Reputation
1,836
Next privilege 2,000 Rep.
Edit questions and answers
Badges
7 28
Impact
~32k people reached

  • 0 posts edited
  • 0 helpful flags
  • 61 votes cast
Nov
8
comment Leveling peaks in list
I just discovered that there is one problem with your approach. Lets say you have data={10,0,0,0,10}. Then both, the first and the last value, are extrem values which I would like to level as described. I did not pay attention to this case when I asked my question. The problem I see, is that the approach must extend data to the left. (desired result: res={5,5,0,0,5,5}. Note: Length@res-Length@data=1)
Nov
5
accepted Difference between AbsoluteTiming and Timing
Nov
5
comment Restricted accumulation of values
@J.M. What about the If-clause? Do have an idea how one could substitute this part of my code with another expression?
Nov
5
asked Difference between AbsoluteTiming and Timing
Nov
2
comment Restricted accumulation of values
@J.M. I'm not really a fan of If (I got the prejudice that it slows down calculations) but I wonder whether in this case really another approach would be faster.
Nov
2
comment Restricted accumulation of values
@MikeHoneychurch The code-line with FoldList is only there to describe how I got to the last code-line. The most crucial point to me was to formulate an alternative to Accumulate with the addition of implementing conditions.
Nov
1
comment Restricted accumulation of values
@acl I added your advice.
Nov
1
revised Restricted accumulation of values
added 79 characters in body
Nov
1
asked Restricted accumulation of values
Oct
22
comment Why is an integer not considered as a real?
@rm-rf This is the answer I was looking for :) If you guys still think we should close this post please do so.
Oct
22
comment Why is an integer not considered as a real?
@rm-rf I agree, the question is a duplicate but as I mentioned the answers do not match. Please see edit.
Oct
22
revised Why is an integer not considered as a real?
added 602 characters in body
Oct
22
comment Why is an integer not considered as a real?
@Mr.Wizard The answers to your quoted question do not answer my question. Please consider the following: zeros = {0, 0.}; sets = {Integers, Reals, Complexes}; eTest=Table[Element[zeros[[j]], sets[[i]]], {i, 3}, {j, 2}] However, Mathematica returns for 0==0. False as J.M. pointed out in his question.
Oct
22
asked Why is an integer not considered as a real?
Oct
18
accepted Why can't NumberQ be used as the head of a pattern?
Oct
18
accepted DeleteCases on list of Strings
Oct
18
accepted Problem with Union and Intersection
Oct
18
accepted Creating word histograms from lists of strings
Oct
18
accepted Defining a non-linear optimization-problem
Oct
18
accepted Compatibility of Mathematica Notebooks written on Mac with Windows