Skip to main content

New answers tagged

4 votes

why replacement does not work with centerdot

The key difference is that MemberQ[Attributes[NonCommutativeMultiply], Flat] == True while Attributes[CenterDot]=={}. You can ...
evanb's user avatar
  • 6,551
0 votes

why replacement does not work with centerdot

When you type a\[CenterDot]ad\[CenterDot]ad the expression has a full form of ...
Jason B.'s user avatar
  • 70.1k
0 votes

Replace an element of nested list with multiple elements

...
Syed's user avatar
  • 59.3k
2 votes

Replace elements in some region in a list

Using ReplaceAt: ...
E. Chan-López's user avatar
3 votes

Replace elements in some region in a list

...
Syed's user avatar
  • 59.3k
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 ...
Carl Verdon's user avatar
3 votes

Make a new list of rules by matching up keys from two given lists of rules

...
user1066's user avatar
  • 22.7k
4 votes

Make a new list of rules by matching up keys from two given lists of rules

...
E. Chan-López's user avatar
5 votes

Make a new list of rules by matching up keys from two given lists of rules

...
Syed's user avatar
  • 59.3k
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 <...
E. Chan-López's user avatar
5 votes

Trying to substitute an element of a given type by an integer

Using ReplaceAll: ...
Syed's user avatar
  • 59.3k
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 ...
lericr's user avatar
  • 33.9k
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 ...
user1066's user avatar
  • 22.7k
4 votes
Accepted

Trying to substitute an element of a given type by an integer

...
azerbajdzan's user avatar
  • 25.1k
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 ...
Domen's user avatar
  • 33.4k

Top 50 recent answers are included