Subscript indices must either be real positive integers or logicals.

1 Ansicht (letzte 30 Tage)
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 Kommentare
KSSV
KSSV am 27 Mär. 2017
Show the full code, what you have taken variables values.
srinu vas
srinu vas am 27 Mär. 2017
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));

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Joshua
Joshua am 27 Mär. 2017
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 Kommentar
srinu vas
srinu vas am 27 Mär. 2017
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));

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Image Analyst
Image Analyst am 27 Mär. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by