New answers tagged

4

If you look at ?FieldDerivative you see that it contains following text NOTICE: FieldDerivative is defined only for objects with head \ QuantumField[...]. If the space-time derivative of other objects is \ wanted, the corresponding rule must be specified. I.e. FieldDerivative is used for deriving Feynman rules, but not for differentiating Lorentz ...


7

ClearAll[fuzzyLCS]; fuzzyLCS[strings__List] := Module[ {subsets, aligned, intersections}, subsets = Subsets[strings, {2, Length@strings}]; aligned = Select[SequenceAlignment[#[[1]], #[[2]]], StringQ[#] &] & /@ subsets; intersections = Intersection @@ (Subsets[#, {1, Length@#}] & /@ (Flatten[Characters[#]] & /@ ...


5

As @Szabolcs suggested I have created my own shortest path finder, based on Dijkstra's algorithm, which allows me to use an EdgeWeightFunction. It's pretty much a translation of the pseudocode on the wiki and I include it below. First I'll demonstrate its use. Example Use The code to generate the two graphs, g1 and g2 in my post above: edges = {1 -> 2, ...


1

Oddly, technical support at $Mathematica$ was unable to reproduce the issue, though @Xavier and I were both able. They asked me to try a clean start, but the crash still occurred. I've sent my SystemInformation[], and this issue is being tracked under CASE:3588559. The technician's last comments: I have filed a report with our developers which includes ...


12

The question title poses a good question, although the question formulation is somewhat specialized and misplaced (as mentioned in a comment). This answer provides data and a method description answering: How to find outliers in 3D numerical data? Data It order to provide a good answer it would be better to use "real life" data. Not spending much ...


2

$Version (* "10.4.1 for Mac OS X x86 (64-bit) (April 11, 2016)" *) Hex[exp_] := FromDigits[exp, 16]; LByte[exp_] := BitAnd[exp, Hex@"00ff"]; HByte[exp_] := BitAnd[exp, Hex@"ff00"]~BitShiftRight~8; PRNG[v_] := Module[{L5, H5, v1, v2, carry}, L5 = LByte@v*5; H5 = HByte@v*5; v1 = LByte@H5 + HByte@L5 + 1; carry = HByte@v1~BitGet~0; v2 = ...


2

Clear[x]; x[0] = 0; T[x_] := Piecewise[{{1 - x, 0 <= x < 1/7}, {(x + 6)/7, 1/7 <= x <= 1}}]; a[n_] := n/(n + 1); b[n_] := n/(n + 5); Include memorization (Functions That Remember Values They Have Found) in the definition of x for effciency x[n_] := x[n] = (1 - a[n - 1]) x[n - 1] + a[n - 1]*T[(1 - b[n - 1]) x[n - 1] + b[n - 1] T[x[n - ...



Top 50 recent answers are included