Agus, I really appreciate your kind support. It's important to have some hand to push you a bit when you are stuck :-) I am convinced that you know that better than many other people.
The problem is that I must use it wrong. I have 42 samples (number of pixel varies and is not really too big) extracted from: (1) a 3x3 matrix with columns MODIS prefire.band2, prefire.band 6 and prefire.band7 (2) a 3x3 matrix with columns MODIS postfire.band2, postfire.band 6 and postfire.band 7 When I feed these two as PRE and POST in my function JM <- function(PRE,POST) etc., I get a Bhattacharayya distance of -50.xxx and the JM becomes something like -7.xxx As you might have noticed I use colMeans() to calculate each bands mean. I really am stuck and can't seem to understand what I am doing wrong. Is it really that difficult? :-0 Thank you in advance, of course even if you don't have the time to reply. Nikos _______________________________________________ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats