for i=1:1:m for j=1:1:n red_reflectance_toa(i,j)= red_reflectance_gain* single(red(i,j)+ red_reflectance_ofset); nir_reflectance_toa(i,j)= nir_reflectance_gain* single(red(i,j)+ nir_reflectance_ofset); red_surface_reflectance(i,j)=red_reflectance_toa(i,j)- (min(red_reflectance_toa(:))); nir_surface_reflectance(i,j)= nir_reflectance_toa(i,j)- (min(nir_reflectance_toa(:))); tir_radiance(i,j)=tir_radiance_gain * single(tir(i,j))+ tir_radiance_ofset; tir_brightness_tempreature(i,j)= k2./log((k1./tir_radiance(i,j))+1); ndvi(i,j)=(nir_surface_reflectance(i,j)-red_surface_reflectance(i,j))./(nir_surface_reflectance(i,j)+(red_surface_reflectance(i,j)));% emissivity(i,j)=(1.00094+0.047)*log(ndvi(i,j));
% pv(i,j)=(ndvi(i,j)- min(ndvi(:)))./(max(ndvi(:))-min(ndvi(:)))
pv(i,j)=(ndvi(i,j)- (0.15)./(0.5)-(0.15));% emissivity(i,j)=0.004*pv(i,j)+ 0.986;
emissivity(i,j)=(0.5)*(pv(i,j))+((0.15)*(1-pv(i,j)))+(4*0.01)*pv(i,j)*(1-pv(i,j)); %%%%%mono window paramiter
C6(i,j)=emissivity(i,j)*(t6); D6(i,j)=(1-t6)*[1+(1-emissivity(i,j))*t6]; LST(i,j)=a6(1-(C6(i,j))-(D6(i,j)))+([b6(1-(C6(i,j))-(D6(i,j)))+(C6(i,j))+(D6(i,j))]).*(tir_brightness_tempreature(i,j))-(D6(i,j)).*Ta./(C6(i,j));
MATLAB: Hi, I want to calculate the LST equationt. I get the following error: Subscript indices must either be real positive integers or logicals. can someone help
subscript indices must either be real positive integers or logicals.
Best Answer