Hallo i am trying to caclulate a variable MedOC3 and NDWI. Then i want to do an if then else
and return the result of MedOC3 (when NDWI>=0) . I am trying to implement the following code but it doesn t work.
var R_443_560=B01/B03
var R_490_560=B02/B03
var MBR=Math.log10(Math.max(R_443_560,R_490_560))
var NDWI=(B03-B08)/(B03+B08)
if NDWI>=0 {
MedOC3=Math.pow(10,(0.38-3.688MBR+1.036MBR2+1.616*MBR3+1.328*MBR**4))
}
return [MedOC3]
Any ideas?
