# Tag Info

12

It is Kampé de Fériet function, introduced in Joseph Kampé de Fériet, "La fonction hypergéométrique.", Mémorial des sciences mathématiques, Paris, Gauthier-Villars. Its definition is given on Notations page: and, in an alternative form, in Wikipedia: {}^{p+q}f_{r+s}\left( \begin{matrix} a_1,\cdots,a_p\colon b_1,b_1{}';\cdots;b_q,b_q{}'; \\ ...

9

This is perhaps a place to start: position[expr_, level_: 1] := With[{positionData = SortBy[ #[[1, 1]] -> #[[All, 2]] & /@ GatherBy[Extract[expr, #, Verbatim] -> # & /@ Position[expr, _, level], First], Min[Length /@ #[[2]]] & ] // Dispatch}, Replace[#, positionData] & ] The second argument controls the ...

5

Good question. I see this was largely answered in the comments yesterday, but since no one posted a formal answer I shall. Cases 2, 3, and 4 appear relatively straightforward. (Incidentally you should be using :>, RuleDelayed here, rather than ->, to localize the pattern names x and y.) The first case that swaps positions needs a closer look ...

4

Temporary message: First of all, sorry for the big mess, especially the 20 line long paragraph. I am tired :) Below, on second thought the Verbatim option is no good yet, as the rules should be gathered differently in the case we do not use Verbatim, but I guess the code does not hinder the proper implementation of this. Allow me to show you this work in ...

4

As Murray noted, you must have made an error calculating the attraction point: 1/2 (1 - Sqrt[1 + 12 μ]) /. μ -> 0.2 -0.4219544457 Trying a point close to this with your code (Please, please, never provide code again as a bitmap. Typing this is no fun.) cobweb::usage = "cobweb[f,x0,nmax,ndrop] produces a cobweb plot for the recursive ...

3

It looks like you pre-initialized your ρplus and ρminus lists with a vector of ones, which is why you see them in the result at positions where the conditions don't satisfy. Presumably, you come from a MATLAB/procedural programming background, and I suggest you read this post (and all other answers on that question) and this one and familiarize yourself with ...

3

This is my little test, and I encountered with some problems. (*Input 1 ==< *) (list_) \[CirclePlus] (element_) := Append[list, element]; (*Input 2 ==< *) (x_List) \[CirclePlus] (y_) := Append[x, y] Failed try. (*Input 3 ==< *) CircleAddTo[x_List, y_] := AppendTo[x, y] (*Input 4 ==< *) CircleAddTo[{1, 2, 3}, 6] (* Output==> ...

2

I believe you have an evaluation order problem. I suspect that you are unaware of the order of evaluation regarding UpValues definitions. Allow me to give a few illustrations. I'll make a generic UpValue rule using UpSetDelayed: _[___, up[1], ___] ^:= "one" Arguments are evaluated before UpValues rules are triggered, unless the function has a Hold ...

2

I believe that the answer is that the sequence can be arbitrarily long unless you put some other constraint. For instance, consider this example: # + # + # + # + # + # + # + # + # + # + # + # + # + # & /@ {1, 2, 3} The preamble can be made as long as you want until you reach the limits of Mathematica (I have no idea how long a Mathematica expression ...

2

I think the complexities of things like PatternTest will obstruct any kind of data structure for searching for general pattern matches. I think some regularity, either with the pattern as in Mr Wizard's answer or with the expression as in Leonid Shifrin's remark, will be needed in order to beat using Position. Jacob Akkerboom has pointed out problems with ...

2

This is a similar approach to Mr. Wizard's I suppose, but using the function's DownValues instead of a dispatch table to store the rules. One major difference is that this code won't work with data containing pattern objects (I guess this might be fixable with Verbatim). The expression is traversed using MapIndexed, for each part visited the position is ...

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