New answers tagged replacement
4
votes
why replacement does not work with centerdot
The key difference is that MemberQ[Attributes[NonCommutativeMultiply], Flat] == True while Attributes[CenterDot]=={}.
You can ...
0
votes
why replacement does not work with centerdot
When you type
a\[CenterDot]ad\[CenterDot]ad
the expression has a full form of
...
0
votes
2
votes
3
votes
3
votes
Make a new list of rules by matching up keys from two given lists of rules
Two other ways to do this are
Thread[Values[list1] -> Values[list2]]
or
...
3
votes
4
votes
3
votes
Trying to substitute an element of a given type by an integer
a = {{0}, {0, 0, 0}, {0, 0, 0, 16, 12}, {13, 7, 11}, {14}};
b = {0, 2, 0, 2, 2, 2, 0, 0, -1, 2, 2, 2, 2, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0};
An alternative using <...
5
votes
5
votes
Trying to substitute an element of a given type by an integer
Here are a couple of alternatives:
Do the replacement as part of the mapped function:
Map[b[[#]] /. List -> 0 &, a, {-1}]
Change the head of the expression ...
1
vote
Trying to substitute an element of a given type by an integer
Extract[b, List /@ a, Replace[#, List -> 0, {1}] &]
(* {{0}, {0, 0, 0}, {0, 0, 0, 0, 2}, {2, 0, 2}, {0}} *)
Or
...
4
votes
Accepted
4
votes
Accepted
The arrow inside string
Look at the reference page for \[RightArrow] to see how you can enter it.
Either type in \[RightArrow], or use the alias ...
Top 50 recent answers are included
Related Tags
replacement × 1686list-manipulation × 298
pattern-matching × 251
rule × 197
simplifying-expressions × 105
functions × 88
expression-manipulation × 78
matrix × 76
evaluation × 65
calculus-and-analysis × 60
string-manipulation × 59
equation-solving × 58
function-construction × 54
symbolic × 52
differential-equations × 41
performance-tuning × 38
algebraic-manipulation × 38
hold × 34
plotting × 29
syntax × 25
formatting × 25
associations × 24
conditional × 23
polynomials × 22
scoping × 22