Subscript indices must either be real positive integers or logicals.

1 visualización (últimos 30 días)
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 comentarios
KSSV
KSSV el 27 de Mzo. de 2017
Show the full code, what you have taken variables values.
srinu vas
srinu vas el 27 de Mzo. de 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));

Iniciar sesión para comentar.

Respuesta aceptada

Joshua
Joshua el 27 de Mzo. de 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 comentario
srinu vas
srinu vas el 27 de Mzo. de 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));

Iniciar sesión para comentar.

Más respuestas (1)

Image Analyst
Image Analyst el 27 de Mzo. de 2017

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by