1 #include<stdio.h> 2 #include<math.h> 3 #include<stdlib.h> 4 5 /* Simple Vegetation ratio */ s_r(double redchan,double nirchan)6double s_r(double redchan, double nirchan) 7 { 8 double result; 9 10 if ((redchan) == 0.0) { 11 result = -1.0; 12 } 13 else { 14 result = (nirchan / redchan); 15 } 16 return result; 17 } 18 19 20