Filter löschen
Filter löschen

How to do for loop for long-term of satellite data?

3 Ansichten (letzte 30 Tage)
reyadh Albarakat
reyadh Albarakat am 20 Okt. 2016
Kommentiert: KSSV am 21 Okt. 2016
Hi every body,
I have long-term of satellite data (16 years) I want to create a loop to read and do some calculate for all images. I did a for loop my the output only for the first image. Here is the code:
if true
y1=-89.5:1.0:89.5;
x1=-179.5:1.0:179.5;
cd E:\GRACE_Files_20022016\GRACE_TIFF
F_read=dir('*.tif');
for i=1:length(F_read);
grace{i}=F_read(i).name;
Grace2{i} = imread(grace{i});
Grace2{i}= im2double(Grace2{i});
A{i} = Grace2{i}(1:end,1:183);
B{i} = Grace2{i}(1:end,184:end);
GRACE{i} = [B,A];
GRACE{i}=GRACE{i}(y1<= 31.91 & y1>= 30.49,x1<=47.85 & x1>= 46.01);
GRACE{i}(GRACE{i}<-99.999)=NaN;
end
end
Thank you in advance
Reyadh
  1 Kommentar
KSSV
KSSV am 21 Okt. 2016
Check F_read, what is it length? It shall be a structure. Check did it cover all the images of the directory.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by