Hi all,
I'm attempting to run the following code:
temp=where(moddata ne 0 or msgdata ne 0,count)
result=regress(moddata[temp],msgdata[temp],CONST=const)
print,result
if count ne 0 then outdata[temp]=msgdata[temp]*float(result)
In this code moddata,msgdata and outdata are all fltarr(2766,2631). Moddata and Msgdata are loaded from tiff files (via ENVI) and outdata is saved to another tiff file.
Now, the problem is - when I open up the output tiff all my data is set equal to zero!
In other words, msgdata[temp]*float(result)=0
Anyone know why this is the case? I know that the actual value for result is okay (if I manually type the value in then I get the correct output), but if I use the variable I get zero. My thinking is that it's some kind of type conversion problem, but as everything is a floating point value I'm not quite sure what's happening.
Any ideas will be greatly appreciated!
Thanks,
Simon.
|