Skip to main content
edited body
Source Link
John
  • 127
  • 4

Suppose I have the following list:

https://pastebin.com/zFin7kkB

and I have a given value of maxDh (let's say 0.5) . How can I replace only the values in the second position with a given operation (e.g. dhMax*5maxDh*5) only when the values of the first position are greater than 74 and dhMaxmaxDh is lower than 1.2 (as in this case)?. For example given that in this example mxDH=0maxDh=0.5, then I would get: {{40,0.0712996},{40.,0.0712996},{40.,0.0712996}......{74.0202,2.5},{74.0404,2.5},{74.2023,2.5}....etc.

Thank you very much in advanced,

Suppose I have the following list:

https://pastebin.com/zFin7kkB

and I have a given value of maxDh (let's say 0.5) . How can I replace only the values in the second position with a given operation (e.g. dhMax*5) only when the values of the first position are greater than 74 and dhMax is lower than 1.2 (as in this case)?. For example given that in this example mxDH=0.5, then I would get: {{40,0.0712996},{40.,0.0712996},{40.,0.0712996}......{74.0202,2.5},{74.0404,2.5},{74.2023,2.5}....etc.

Thank you very much in advanced,

Suppose I have the following list:

https://pastebin.com/zFin7kkB

and I have a given value of maxDh (let's say 0.5) . How can I replace only the values in the second position with a given operation (e.g. maxDh*5) only when the values of the first position are greater than 74 and maxDh is lower than 1.2 (as in this case)?. For example given that in this example maxDh=0.5, then I would get: {{40,0.0712996},{40.,0.0712996},{40.,0.0712996}......{74.0202,2.5},{74.0404,2.5},{74.2023,2.5}....etc.

Thank you very much in advanced,

edited tags
Link
Source Link
John
  • 127
  • 4

Replace the values of the second position in a list given two conditions

Suppose I have the following list:

https://pastebin.com/zFin7kkB

and I have a given value of maxDh (let's say 0.5) . How can I replace only the values in the second position with a given operation (e.g. dhMax*5) only when the values of the first position are greater than 74 and dhMax is lower than 1.2 (as in this case)?. For example given that in this example mxDH=0.5, then I would get: {{40,0.0712996},{40.,0.0712996},{40.,0.0712996}......{74.0202,2.5},{74.0404,2.5},{74.2023,2.5}....etc.

Thank you very much in advanced,