Hot answers tagged

13

This seems to be related to the notation "\.XX" being used to enter characters in hexadecimal notation, as explained in the documentation. For instance, entering "\.09" will get you the tab character, which in ASCII has the value 9. Similarly "\.0d" codes for the Carriage Return (CR) character. What appears to be the bug is twofold: "\. d" has the space ...


9

I believe that s = ArcTan[Sqrt[-4 E^(I a)]] N[Limit[s, a -> 0]] (* 4.71239 + 0.549306 I *) is a bug in Limit. Plotting the function s Plot[Evaluate[ReIm[s]], {a, -1, 1}] indicates that s assumes the value above nowhere in the vicinity of a == 0. (The same is true in the complex plane.) Furthermore, Limit[s, a -> 0] (* π + I ArcTanh[2] *) ...


8

This is a minor bug, acknowledged by WRI and present as of v10.4. The problem is that for Plot3D the required syntax for AxesLabel is a list with three entries instead of two. When given a two-member list as an argument, though, Plot3D silently interprets that as the AxesLabel→Automatic setting, and it labels the axes with the internal variables of the plot, ...


7

This looks like a bug. Please report it to Wolfram Support. A simple workaround is to specify your own colour function. ArrayPlot[{{1, 0.1, 0}, {0.1, 0, 0}}, PlotLegends -> Automatic, ColorFunction -> (GrayLevel[1 - #] &)]


7

Workarounds until this bug has been fixed: 1) ArrayPlot workaround Using arrayPlot[data_List] := Block[{list = Reverse@data, Reverse}, Reverse[x_] := x; ArrayPlot[list, ColorFunction -> Function[a, RGBColor[a, a, a]], ColorFunctionScaling -> False] ] instead of ArrayPlot. 2) Fixing Reverse Unprotect@Reverse; Reverse[x_SparseArray] := ...


7

This is a bug. The length of each association returned should be VertexCount[g1], but it isn't. Length /@ FindGraphIsomorphism[g1, g2, All] (* {10, 6, 8, 6, 8, 6, 9, 9, 9, 9, 6, 8, 8, 10, 8, 10, 10, 9, \ 9, 10, 9, 10, 9, 10, 10, 9, 9, 10, 8, 10, 10, 9, 10, 8, 9, 10, 9, 10, \ 9, 10, 10, 9, 8, 10, 9, 10, 8, 10, 10, 10, 10, 9, 8, 9, 10, 10, 6, 9, \ 10, 9, 8, ...


6

It seems like a glitch in the pattern matcher, occuring whenever named patterns appear in a head and PatternSequence appears at level 1 in the body. Null /. f_[PatternSequence[x, y]] -> 0 Pattern::patvar : First element in pattern Pattern[1, _] is not a valid pattern name. >> When there are multiple named patterns in the head there are additional ...


6

Some insight can be gained by plotting Sqrt[Exp[I*t]^2 - 1] in the complex plane. Plot3D[Evaluate[ReIm[Sqrt[Exp[I*t]^2 - 1] /. t -> tr + I ti]], {tr, 0, Pi}, {ti, -1, 1}, AxesLabel -> {tr, ti, f}] Branch points occur at t == n Pi, n an integer, with branch cuts extending from the branch points to t == n Pi + I ∞. Visibly, there also are ...


5

Here is a workaround suggested by the response I received from WRI: {sol} = NDSolve[{x'[t] == -0.08 x[t], x[0] == 1., WhenEvent[Norm[{x'[t]}] < 0.0001, {x[t] -> 1.}]}, {x}, {t, 0, 200}, Method -> {"EquationSimplification" -> "Residual"} ] Plot[x[t] /. sol, {t, 0, 200}] Warning: This option works by converting the system to a DAE, ...


5

The result we see is due to a somewhat baffling formatting decision made within the machinery that generates the box form of datasets. When formatting a date object, it uses DateString form. However, it also expressly checks to see whether the date has three components. If so, it drops the first four characters from the string form. This is strange and I ...


4

This is an irritating bug that was introduced in V8 and has not been fixed even in the latest version (10.4.1) of Mathematica. Both f = FunctionInterpolation[N[1, 20] x, {x, 0, 1}] and g = FunctionInterpolation[N[1, 2] x, {x, 0, 1}] give a spate of error messages similar to ones you encountered. In both cases the functions returned appear to behave ...


4

This was introduced in 10.0 and fixed in 10.3. curve1 = {Cos[φ] (4. - 1. Cos[4 φ] + 1. Cos[8 φ] - 1. Cos[12 φ]), (4. - 1. Cos[4 φ] + 1. Cos[8 φ] - 1. Cos[12 φ]) Sin[φ]}; curve2 = 2. - 1. Cos[4 φ]; tangent1 = D[curve1, φ]; surface = {{Cos[3 z], Sin[3 z], 0}, {-Sin[3 z], Cos[3 z], 0}, {0, 0, 1}}.Append[(1 - Sqrt[1 - Abs[z]]) (...


3

Try: {sol} = NDSolve[{x'[t] == -0.08 x[t], x[0] == 1., WhenEvent[Norm[{x'[t]}] < 0.0001, x[t] -> 1.; x[t] -> 1]}, {x}, {t, 0, 200}]


3

A support case with the identification [CASE:3620463] was created. And a reply: [...] I have forwarded an incident report to our developers with the information you provided.


3

This is a bug that has been fixed in Mathematica 10.3.0 and later. The cause of the crash is one of the computations that the predictive interface tries in the background, so a workaround for earlier versions would be to turn off the Suggestions Bar by unchecking the box in Preferences.


3

It is definitely a bug. And it can be formuated even more sharply. $Version (* Out[156]= "10.1.0 for Microsoft Windows (64-bit) (March 24, 2015)" *) Define f[n_, a_] := (1 + (-1)^n/n^a)^n If a>0 the limit exists and is equal to unity. If a == 0 we have the problem of the OP, where one might say that "two alternative limits exist". This is ...


3

I don't think that StringMatchQ["x", Except[{"*"}]] works as expected as well as StringMatchQ["x", Except["*"]]: StringMatchQ["x", Except[{"*"}]] StringMatchQ["x", Except["*"]] True True The string pattern "*" is an abbreviated string pattern consisted from the only metacharacter * which corresponds to zero or more characters according to the first ...


3

This bug appears to be fixed as early as of version 10.3.1.


2

I think this is a bug of FindGraphIsomorphism.And you should give a report to Wolfram.This is what my thinking about it. IsomorphicGraphQ[VertexReplace[g1, Normal[#]], g1] & /@ isos // Counts <|True -> 64, False -> 56|> But I still think there are work-around to find the isomorphic graph.This is my solution. Find the permutation group all ...


2

The computation eq = A x^2 (x^2 + 1) F'''[x] - (3 A (b - 2) x^3 + a x^2 + A (b - 2) x + a) F''[x] + 3 (b - 1) x (A (b - 2) x + 2/3 a) F'[x] - (b - 1) b (A (b - 2) x + a) F[x]; s = DSolve[eq == 0, F, x][[1, 1]]; after further simplification yields s[[2, 2]] = FullSimplify[s[[2, 2]]]; s (* F -> Function[{x}, (-I + x)^b C[1] + (I + x)^b C[2] + (...


1

This isn't a very satisfactory answer, but it turns out that this exact same code works on version 10.4.0 for Linux x86 (64-bit) (February 26, 2016) on the same OS and laptop, and as @JHM points out it works on a Windows machine, therefore I suspect this might be a version+OS specific bug. In any case, my problem is solved.


1

ComplexExpand with TargetFunctions -> Abs help us to solve this integral. f[t_] := Sqrt[Exp[I*t]^2 - 1]; complex = ComplexExpand[f[t], TargetFunctions -> Abs] Sqrt[Abs[-1 + E^(2 I t)]] Cos[1/2 (-I Log[-1 + E^(2 I t)] + I Log[Abs[-1 + E^(2 I t)]])] + I Sqrt[Abs[-1 + E^(2 I t)]] Sin[1/2 (-I Log[-1 + E^(2 I t)] + I Log[Abs[-1 + E^(2 I ...



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