Tag Info

Hot answers tagged

3

One thing to check is what message options are set under Global Preferences in the Option Inspector. In particular, "KernelMessageAction" should be set to "PrintToNotebook". See window capture below.


2

There is a missing value for 9000 which is problematic. Further, rescaling helps to deal with overflow errors. data = {{0, 33.5}, {1000, 33.5}, {2000, 33}, {3000, 30.8}, {4000, 27}, {5000, 22.4}, {6000, 17}, {7000, 12.8}, {8000, 8.8}, {10000, 5.45}, {11000, 4.5}, {12000, 3.7}, {13000, 3}, {14000, 2.5}, {15000, 2.05}, {16000, 1.7}, {17000, ...


2

Interesting! Add Pause[10] between your two lines, and you'll get some time to peruse the output. Equivalently, split it into two cells, and re-run the definition of simulateRandomWalk after you've got some valid output. The output of Animate is "Dynamic". When a new definition of the module inside simulateRandomWalk is created, a new local variable ...


2

The issue is with your If returning different types ( a real list or Null ). Try this: Gapped = Compile[{{angle, _Complex}}, Module[{c1, c2, c3, cond, Phi, theta, phi}, theta = Re[angle]; phi = Im[angle]; {c1, c2, c3} = 1 - 3 Sin[theta]^2 Cos[phi - 2 Pi (# - 1)/3]^2 & /@ {1, 2, 3}; cond = ((c2 + c3)^2 - c1^2)/(4 c2 c3); If[0 ...


1

If you use With instead and factor in plotRange directly, it also works flawlessly: simulateRandomWalk[steps_Integer, prob_] := With[{accumulatedSteps = Prepend[Accumulate[ RandomChoice[{N[1 - prob], N[prob]} -> {-1, 1}, steps]], 0]}, Animate[ ListLinePlot[{Range[0, n], Take[accumulatedSteps, n + 1]} //Transpose, ...


1

The message should be your first hint. Nonetheless: ListLinePlot[data] See anything strange? The data at point 9000 is incomplete. Let's interpolate for a test: interp = Interpolation[data[[Drop[Range@24, {10}]]], 9000]; data[[10]] = {9000, %}; model=NonlinearModelFit[data, a1 Exp[-t^2/t1], {a1, t1}, t]


1

To answer your first question: your syllogism should probably be formulated as Resolve[ Implies[ ForAll[triangle, Implies[ Element[triangle, equilateralTriangles], Element[triangle, isoscelesTriangles]]] && Exists[triangle, NotElement[triangle, equilateralTriangles]], Exists[triangle, NotElement[triangle, ...



Only top voted, non community-wiki answers of a minimum length are eligible