# Tag Info

11

I think it's a bug that DeleteCases does not work; more specifically, it is not permitted to return an empty tensor when deleting elements from an tensor of rank > 1. Compile can return an empty tensor, but certain internal functions cannot. In particular Table in this case, but also Part. It seems a complicated situation, would take a long time to ...

10

Root Cause The root cause of the error is that we are attempting to join tensors of incompatible shapes. Namely, a 1x2 array... Dimensions[{{0,0}}] (* {1, 2} *) ... with a zero-length one-dimensional array: Dimensions[ConstantArray[{0, 0}, 0]] (* {0} *) Dimensions[{}] (* {0} *) While this is permitted by the main evaluator, the compiler applies stricter ...

4

Update Upon further examination, I noticed that the definition of Subscript[x, k - 1]'[0] in the question contains an extra factor of b, with the consequence that this initial condition is inconsistent with the ODEs, Sqrt[Subscript[y, k - 1]'[t]^2 + Subscript[x, k - 1]'[t]^2] == b Also, the definitions of Subscript[x, n]'[0] and Subscript[y, n]'[0] are ...

2

This can be done as follows. ClearAll["Global`*"]; f[\[Theta]_?NumericQ, d_?NumericQ, \[Omega]_?NumericQ, \[Tau]_?NumericQ] := NIntegrate[k ((1/\[Tau]) Exp[-2 k d])/((1/\[Tau])^2 + (\[Omega] + k Cos[\[Theta]] + k Sin[\[Theta]])^2), {k, 0, Infinity}] f[Pi/4, 1, Pi/3, 2] 0.0281453 g[d_?NumericQ, \[Omega]_?NumericQ, \[Tau]_?NumericQ] := ...

1

It might be better to suppress the specific message, and let others pass. code: ClearAll[x, a] CurrentValue[$FrontEnd, {"PrintAction"}] = {"PrintToNotebook"}; CurrentValue[$FrontEnd, {"MessageOptions","KernelMessageAction"}] = {"PrintToNotebook", "Beep"}; And now Quiet[Integrate[(ArcTan[a*x] - ArcTan[b*x])/x, {x, 0,...

1

Looks something is going wrong with the automatic compilation process. You observe: df /@ pts[[2 ;; -2]]; RegionDistanceFunction::regp: A correctly specified region expected at position 1 of RegionDistanceFunction[Line[{Compile$8,Compile$8}],2,Sqrt[(-105.65+Subscript[Slot[<<1>>], <<1>>])^2+(-103.317+Subscript[Slot[<<1>>], ...

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