# Tag Info

### How can I flip/mirror the legend?

Using the undocumented option MarkerLayout, as @MarcoB points out, it could be something like this: ...

### How can I flip/mirror the legend?

You can use "MarkerLayout", an undocumented option to Legend functions I've learned about in this answer. In fact, I think this question is likely a ...
Accepted

### Find first position satisfying condition, which is true after a certain element

Perhaps you mean binary search. If you plan to compile, see here and here. ...

### Find first position satisfying condition, which is true after a certain element

I am probably confused, but I can't explain the following. Here is a list of 100 integers. ...

### Find first position satisfying condition, which is true after a certain element

I've made a function called Earliest So what is Earliest function ? ...
1 vote

### Additional line in the Plotting

You must restrict the region of "P" and only plot the piece you want. However, this will restrict the x-axis. To prevent this you need ...
1 vote
Accepted

### Additional line in the Plotting

The extra line is due to a jump discontinuity in the value of G[r], which switches from positive to negative right before that jump. One way to avoid that portion ...

### Partially Orderless Arguments in Functions

Edited after comment below The proposed solution can be useful if the objective is solely to manipulate a symbolic inert function (a symbol without an explicit definition and that does not evaluate ...

### Replacement of a variable only for a part of an expression

You may either use ReplacePart (close to what @Alrubaie proposed) expr = a^2 + f[a]; ReplacePart[expr, 2 -> f[c]] (* a^2 + f[c] *) or map the replacement ...

### Replacement of a variable only for a part of an expression

You just need ReplacePart Where ReplacePart[Function/Expression , Location which part to replace] ...
1 vote
Accepted

### Additional lines in the plotting graph

Your equations have more solutions than the two you are apparently interested in: l = NSolve[T[r] == 0, r]; Length[l] (* Out: 5 *) (In passing, note that ...
Accepted

### How to plot two functions?

Try ParametricPlot ...

### How to plot two functions?

You can use With to give a local value for y and ParametricPlot for the plot. ...
Accepted

### Very simple, unexpected Low Performance of set(=)

I assume that, like all modern software, Mathematica implements copy-on-write. From the Wikipedia: Copy-on-write (COW), sometimes referred to as implicit sharing or shadowing, is a resource-...
Accepted

### Determination of a Function

This is actually a tiny bit tricky as far as I'm aware, in that there's not a built-in syntax that "just does it"! Maybe someone's aware of a way Mathematica can easily solve for symbolic ...
Accepted

### What is the best method to search pattern for 2D list?

You could use ArrayFilter: ...

### What is the best method to search pattern for 2D list?

another array-based method: ...

### What is the best method to search pattern for 2D list?

I am sure there are many ways to do it, but here is my take: ...

### Is there a formula that can quickly calculate the ByteCount of an integer?

Table[FromDigits[Table[5, {n}]], {n, 4}] (*out: {5,55,555,5555}*) plot: ...
Accepted

### Is there a formula that can quickly calculate the ByteCount of an integer?

You could try this as an alternative: ListLogLinearPlot[ Table[ {num, ByteCount[num]}, {num, PowerRange[10^19]} ] ]

### Is there a formula that can quickly calculate the ByteCount of an integer?

I think what's going on here is that the Manipulate automatically converts num to a fixed precision floating point number, probably because the step size becomes so ...

### Is there any way to get nthComposition of a function?

Clear["Global`*"] For some functions f, you can use NestList and ...
Accepted

### Is there any way to get nthComposition of a function?

Depending on exactly how you want to use this, you might want to bundle this up into its own function (or function overload). ...

### Is there any way to get nthComposition of a function?

As answered well in the comment, we can find it by Nest[f, x, 5]
1 vote

### How to define a function of parameters of a DSolve output?

An other way with DSolve is ...
1 vote

### How to define a function of parameters of a DSolve output?

You can solve with the parameters directly: ...

Try this: ...
Accepted

### Strange behavior of 'SquareFreeQ'

Try to evaluate this: SquareFreeQ[List] It turns out that List is, indeed, square-free. So, it was replaced (it was the head of the expression, so that's where the ...
1 vote
Accepted

...

### How to create a matrix with multiple variables defining the elements?

Array[f,{3,3,3,3},{0,0,0,0}] will give you a 4-dimensional matrix. f@@@Tuples[{0,1,2},4] will give you a 1-dimensional list. ...