How would I go about multiplying values of my vector in a certain range by a number?
What I have right now is this:
img[img<a && img<b]<-img[img<a && img<b]*0.2
img[img>=a && img<b]<- img[img>=a && img<b]*0.5 + ya
img[img>a && img>=b]<-img[img>a && img>=b]+yb
Which is not working as expected.
What I want it to do: If the value is within the first interval, I'll multiply the original value it by a certain number. If it's on the second interval, multiply the original value by another number, thing like that.
I know how to substitute the original values for another number, but not how to manipulate the original number.
Thank you!