Subscript indices must either be real positive integers or logicals.

1 次查看(过去 30 天)
BT = (K2) ./ (log((K1 ./ L+ 1)));
y = int16(11.289);
P = (1.438*10.^-2);
Problem comes from this
LST = (BT)./(1 + y(BT))./(P)*(log(Ei));
  2 个评论
srinu vas
srinu vas 2017-3-27
Red = geotiffread('C:\Users\syduxps\Desktop\Desktop-26-02-2017\Matlab_Workshop\aster\Aster\band2.tif'); figure(1),imshow(Red),title('BandRed'); NIRed = geotiffread('C:\Users\syduxps\Desktop\Desktop-26-02-2017\Matlab_Workshop\aster\Aster\Band3.tif'); figure(2),imshow(NIRed),title('BandNIR'); R = histeq(Red); NIR = histeq(NIRed);
R = im2double®; NIR = im2double(NIR); %% %Estimation of NDVI ndvi = (NIR -R) ./ (NIR + R);
figure(3),imhist(ndvi) figure(4),imshow(ndvi, []), title('NDVI'); text(size(ndvi,2), size(ndvi,1) + 15,... 'Positive values shows the Vegetation and Negative values shows the NoneType Vegetation',... 'FontSize', 8, 'HorizontalAlignment', 'right');
colormap(jet),colorbar; impixelinfo %% %Estimation of Land Surface Emissivity%% %NDVIs = soils %NDVIv = Vegetation NDVIs = 0.2; NDVIv = 0.5;
Pv = (ndvi - NDVIs) ./ (NDVIv - NDVIs); ndvi = (Pv.^2); Cj = 0; Ei = (NDVIs*ndvi + NDVIv*(1-ndvi) + Cj); figure(5),imshow(Ei),title('Emissivity'); colormap(jet),colorbar; impixelinfo
%% %Conversion of Digital Numbers (DNs) to Radiance DN = 4094; UCC = 0.005225; L = (DN - 1)*UCC; %% % Conversion of Radiance to Brightness Temperature K1 = 649.60; K2 = 1274.49;
BT = (K2) ./ (log((K1 ./ L+ 1))); y = int16(fix(11.289)); P = (1.438*10.^-2);
LST = (BT)./(1 + y*(BT))./(P)*(log)*((Ei));

请先登录,再进行评论。

采纳的回答

Joshua
Joshua 2017-3-27
I am not really sure what BT is, but depending on your values of K1, K2, and L, it probably won't be an integer. For example, with K1=1, K2=1, and L=1, BT=1.4427. y(BT) tries to access the 1.4427th index of y which does not exist. You need to change your code so BT is always an integer.
Or maybe you want y*BT instead for multiplication?
  1 个评论
srinu vas
srinu vas 2017-3-27
Thank you very much for reply ... Here see full code ...
Red = geotiffread('C:\Users\syduxps\Desktop\Desktop-26-02-2017\Matlab_Workshop\aster\Aster\band2.tif'); figure(1),imshow(Red),title('BandRed'); NIRed = geotiffread('C:\Users\syduxps\Desktop\Desktop-26-02-2017\Matlab_Workshop\aster\Aster\Band3.tif'); figure(2),imshow(NIRed),title('BandNIR'); R = histeq(Red); NIR = histeq(NIRed);
R = im2double®; NIR = im2double(NIR); %% %Estimation of NDVI ndvi = (NIR -R) ./ (NIR + R);
figure(3),imhist(ndvi) figure(4),imshow(ndvi, []), title('NDVI'); text(size(ndvi,2), size(ndvi,1) + 15,... 'Positive values shows the Vegetation and Negative values shows the NoneType Vegetation',... 'FontSize', 8, 'HorizontalAlignment', 'right');
colormap(jet),colorbar; impixelinfo %% %Estimation of Land Surface Emissivity%% %NDVIs = soils %NDVIv = Vegetation NDVIs = 0.2; NDVIv = 0.5;
Pv = (ndvi - NDVIs) ./ (NDVIv - NDVIs); ndvi = (Pv.^2); Cj = 0; Ei = (NDVIs*ndvi + NDVIv*(1-ndvi) + Cj); figure(5),imshow(Ei),title('Emissivity'); colormap(jet),colorbar; impixelinfo
%% %Conversion of Digital Numbers (DNs) to Radiance DN = 4094; UCC = 0.005225; L = (DN - 1)*UCC; %% % Conversion of Radiance to Brightness Temperature K1 = 649.60; K2 = 1274.49;
BT = (K2) ./ (log((K1 ./ L+ 1))); y = int16(fix(11.289)); P = (1.438*10.^-2);
LST = (BT)./(1 + y*(BT))./(P)*(log)*((Ei));

请先登录,再进行评论。

更多回答(1 个)

Image Analyst
Image Analyst 2017-3-27

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by