Wolfram Mathematica

Welcome! This is the main Mathematica chat room for mathematic...
Feb 1, 2022 21:07
@psimeson Try Sort[flist, AsymptoticLess[#1, #2, n -> Infinity] &]
Dec 21, 2021 02:17
@ThunderBiggi You could use listDepth = ArrayDepth @* PadRight, e.g. listDepth[{{a, b, c}, {e, d, f, g, t}, {t}}] returns 2.
Sep 2, 2021 18:27
@Shamina The RHS of PlotStyle needs to be a list of length 6. You use a list with only length 2.
Sep 18, 2020 20:31
@Manuel--Moe--G Could do Select[test2]@KeySelect[test1]@assoc1
Aug 25, 2020 22:00
@MatsGranvik I assume you know that ZetaZero is a built-in function? For example: `N[ZetaZero[1], 100]

0.50000000000000000000000000000000000000000000000000000000000000000000\
000000000000000000000000000000 +
14.134725141734693790457251983562470270784257115699243175685567460149\
96342980925676494901039317156101 I`
Jun 26, 2020 02:55
@Mr.Wizard There are two kinds of precendence. One that the kernel uses to create boxes, and one that the front end uses to parse boxes. The first question deals with the kernel, and the second seems to deal with the front end. So, I think it makes sense to keep them separate. Probably the questions could be clarified to point out this difference, though. I didn't bother because I felt that one of the answerers on the second question was ignoring my comments.
Nov 18, 2019 18:45
@MichaelE2 Why not use Presentation and Working screen style environments, and have a cell style that only shows up in the Working screen style environment?
Sep 4, 2019 18:32
@halirutan Have you tried using Clip? For example, Clip[mat, {1, max}] should be equivalent, and about 3 times faster than your compiled function.
Jun 6, 2019 14:53
@MichaelE2 You can also set BoxForm`UseApproximations to True, although you will have to unprotect it first.
May 24, 2019 05:38
@WeavingBird1917 By default, machine numbers only print with a maximum of 6 digits of precision. If you want more digits to be displayed, you can use the Style option PrintPrecision, e.g., Style[Table[Round[123.810284,10^n],{n,-5,0}]//N,PrintPrecision->8]
May 15, 2019 14:55
@b3m2a1 This is because CompoundExpression[..., expr, Null] stores expr in Out. See this answer by @MrWizard.
Apr 21, 2019 16:23
@LukasLang What happens if you do CurrentValue[EvaluationNotebook[], CellGrouping]=Manual?
Apr 2, 2019 15:42
@PlatoManiac You can use RegionMember @ RegionUnion[DiscretizeRegion /@ polys]. In M11.3 it seems that RegionMember[polys[[2]]] hangs, but this is fixed in M12.
Oct 19, 2018 00:01
@zahbaz My email is Uncompress["1:eJxTTMoPChZkYGBITizKKXcoz89JK0rM1UvOzwUAZLcIZw=="]
Sep 23, 2018 07:16
@yode Add AxesOrigin->{0,0}
Sep 11, 2018 18:25
@LukasLang You could use With[{a:=Print[1]}, Hold[a]]
Sep 9, 2018 15:10
@Mr.Eight Perhaps you can use ToExpression with TraditionalForm, i.e., ToExpression[string, TraditionalForm].
Jul 27, 2018 07:29
And will short circuit as soon as a test returns False.
Jul 27, 2018 07:28
I used ``If[!NameQ["System`AllTrue"],
AllTrue[{elems___}, test_] := ReleaseHold[And @@ test /@ Hold[elems]]
]``
May 31, 2018 04:48
@Nasser Another alternative that will work with HoldForm and friends is Module[{x}, x /: MakeBoxes[x, form_] := "x"; HoldForm[Integrate[Sin[x], x]]==Integrate[Sin[x], x]]. This should also work with TeXForm.
May 28, 2018 18:53
@Nasser you could try Module[{x=RawBoxes["x"], y=RawBoxes["y"], s}, Print[x^2+3y]]
4
Jan 6, 2018 17:44
@Kiro You can use IntegerExponent for a bit of a speed gain: BitShiftRight[num, IntegerExponent[num, 2]]
Dec 20, 2017 00:22
That should have been g2, which would have shown the "Sparse version being about 3 times faster. However, they don't return the same edge lists for Graph[EdgeList[g1]]. They do return the same edge lists for Graph[VertexList[g1], EdgeList[g1]], though.
Dec 20, 2017 00:14
Maybe GraphComputation`ToGraphRepresentation can help?

IndexGraph[g1]; // AbsoluteTiming
IndexGraph @ GraphComputation`ToGraphRepresentation[g1, "Sparse"]; // AbsoluteTiming

{3.*10^-6, Null}

{0.002497, Null}
Dec 7, 2017 17:45
@b3m2a1 Of course, I just used your idea and method.
Oct 27, 2017 01:28
@JulianWolf Take a look at this answer
Oct 10, 2017 17:40
@xzczd Nevermind, I see that your question is not about the error messages.
Oct 10, 2017 17:37
@xzczd Have you seen my answer to More Ticks::ticks errors in AbsoluteOptions in v10? If that answer resolves your issue, maybe that question can be referenced instead?
Sep 29, 2017 06:50
@VladimirReshetnikov It's now called NumericalMath`NSequenceLimit
Jun 7, 2017 04:42
@MichaelE2 It's not markdown to nb, but rather Stack Exchange URL to nb, but mathematica.stackexchange.com/questions/3535/… might be of interest?
 
Jun 23, 2017 05:06
I expect that you won't be able to speed up your function to any significant degree. What is the other processing, and what information is stored at each step? It's possible that this other processing could be integrated into your matrix operations to provide a speed up.
Jun 23, 2017 05:06
What are you going to do with all of this data? Just store 1000s of 30 x 3000 x 3000 arrays? Each array will take 2.2 GB. Or are you processing the arrays further?
 
Jun 19, 2017 18:38
Yes
Jun 19, 2017 18:35
We substitute the guess only into the integral. Then use NDSolve to figure out what the corresponding x is.
Jun 19, 2017 18:30
Yes. cur[0] = #& is equivalent to cur[0][z_] := z
Jun 19, 2017 18:24
Isn't x[1]==1? If you want to have an initial condition of say x[1] == x1 for some value x1 that isn't 1 then you would change the last term to $g(\zeta) x1$. If you instead use $g(\zeta) x(1)$ then NDSolve will issue messages.
Jun 19, 2017 18:24
Yes, cut[n][0] is the nth estimate of x[0]
Jun 19, 2017 18:24
I think including x[1] in the ODE is an issue, because Mathematica is expecting all args of a function to be the same. If you want to vary x[1], you can add the variable x1 and use x[1] == x1.
 

 PackageData.net

conversation about packagedata.net, a Mathematica package repo...
Jun 12, 2017 19:09
@halirutan Have you seen my Q&A -> Mathematica notebook converter (3535)?