kram1032
Reputation
Next privilege 250 Rep.
 Feb21 comment How could I optimize the following high-dimensional table with a lot of duplicates? For easier generalization, is it the same to do Tuples[t,7] compared to Tuples[{t,t,t,t,t,t,t}]? - at least the resulting image seems to be the same. That way you'd in general get: t = Table[Exp[2 I Pi i/k], {i, 0, k-1}]; u = Union[Total /@ Tuples[t,n]]; ListPlot[{Re@#, Im@#} & /@ u, AspectRatio -> 1, Axes->None] for sums over n order-k roots of unity. Feb21 accepted How could I optimize the following high-dimensional table with a lot of duplicates? Feb21 comment How could I optimize the following high-dimensional table with a lot of duplicates? perfect, thank you! Feb21 comment How could I optimize the following high-dimensional table with a lot of duplicates? In this particular use-case, positive-or-zero-integer-valued linear-combinations of all roots of unity of a given order is all you need. If the symmetry grants it (if there is mirror-symmetry across a given axis), you can replace two positive Integers by one signed Integer. - now, is there a way to take further advantage of the inherent symmetry? Feb21 comment How could I optimize the following high-dimensional table with a lot of duplicates? I just realized there might be a much simpler way to solve this particular kind of problem but even so, if there is a generic way to skip redundant steps in Tables like this, it should be a valuable question non-the-less. Feb21 revised How could I optimize the following high-dimensional table with a lot of duplicates? added 4 characters in body Feb21 revised How could I optimize the following high-dimensional table with a lot of duplicates? added 4 characters in body Feb21 comment How could I optimize the following high-dimensional table with a lot of duplicates? @YvesKlett as said, it should work now. Unless I somehow can't directly copy Mathematica code from Mathematica 8 and post it as-is in a codeblock Feb21 awarded Commentator Feb21 comment How could I optimize the following high-dimensional table with a lot of duplicates? @YvesKlett This now is straight from Mathematica. I just wanted to make it more readible. Feb21 revised How could I optimize the following high-dimensional table with a lot of duplicates? added 18 characters in body Feb21 asked How could I optimize the following high-dimensional table with a lot of duplicates? Feb3 revised Integrating over Bessel Function erroreous? (Hankel Transform) spelling fix Feb2 revised Integrating over Bessel Function erroreous? (Hankel Transform) added 1 characters in body Feb2 comment Integrating over Bessel Function erroreous? (Hankel Transform) Integrate[(Sin[t]-t Cos[t])/t^2 BesselJ[0,t x],{t,0,Infinity},Assumptions->x>0] should return something equivalent to UnitBox[x/2]Sqrt[1-x^2] (at least for x>0) but doesn't get evaluated at all. Without assumptions, it returns ConditionalExpression[0,x>1 || x<-1] - basically the same problem but not fixable with that simple assumption. Feb2 comment Integrating over Bessel Function erroreous? (Hankel Transform) @m_goldberg of course, that bit of simplifying would make it a bit faster but it's less general. I had this problem with more complex functions as input as well. Ones that wouldn't simplify so readily. Feb2 comment Integrating over Bessel Function erroreous? (Hankel Transform) That apparently works. Weird. I think I previously had a case where it didn't. Feb2 asked Integrating over Bessel Function erroreous? (Hankel Transform) Jan30 comment How to control Boundary conditions after integrating over piecewise function? @whuber sometimes the formating of the conditions will also be messed up, having something depending on more variables in the middle, rather than just plain x, like something<2x-tx>1) which I want to turn to x<=-1 or x>=1 respectively, and additionally, I want to get rid of any single point definitions: What I'm doing is guaranteed to be continuous and won't need such things. Beyond that I might need some more but I'll have to see if anything weird happens, in which case I'll come back if it's not clear to me how to extend a solution that may be given here.