Skip to main content
edited title
Link
user64494
  • 29.1k
  • 4
  • 29
  • 56

How to replace an element in a list with an element in another list with matching indices?

added 44 characters in body; edited title
Source Link
march
  • 24.2k
  • 2
  • 46
  • 102

How to applay a replace foran element in a list with an element in another list with matching indices

I have a list like this l={1+2s,2+3s,4+1s} and I have calculated s={1,2,3} I need to replace s in l so that l={1+21l = {1 + 2*s, 2 + 3*s, 4 + 1*s}, 2+32,4+13}and I have calculated s = {1, 2, 3}. I need to replace s in l so that l = {1 + 2*1, 2 + 3*2, 4 + 1*3}. Is it possible to do that with replace and ruleReplacAll (/./.) and Rule?

How to applay a replace for a list

I have a list like this l={1+2s,2+3s,4+1s} and I have calculated s={1,2,3} I need to replace s in l so that l={1+21, 2+32,4+13}. Is it possible to do that with replace and rule (/.)

How to replace an element in a list with an element in another list with matching indices

I have a list like this l = {1 + 2*s, 2 + 3*s, 4 + 1*s}, and I have calculated s = {1, 2, 3}. I need to replace s in l so that l = {1 + 2*1, 2 + 3*2, 4 + 1*3}. Is it possible to do that with ReplacAll (/.) and Rule?

Source Link

How to applay a replace for a list

I have a list like this l={1+2s,2+3s,4+1s} and I have calculated s={1,2,3} I need to replace s in l so that l={1+21, 2+32,4+13}. Is it possible to do that with replace and rule (/.)