필터 지우기
필터 지우기

Subscript indices must either be real positive integers or logicals.

조회 수: 2 (최근 30일)
srinu vas
srinu vas 2017년 3월 27일
댓글: srinu vas 2017년 3월 27일
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
KSSV
KSSV 2017년 3월 27일
Show the full code, what you have taken variables values.
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에서 Agriculture에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by