fileFolder=fullfile('/Users/miaoyuchun/Desktop/superx2/test_Houston/'); dirOutput=dir(fullfile(fileFolder,'*.mat')); fileNames={dirOutput.name}; factor = 0.5; img_size = 256; bands = 48; gt = zeros(numel(fileNames),img_size,img_size,bands); ms = zeros(numel(fileNames),img_size*factor,img_size*factor,bands); ms_bicubic = zeros(numel(fileNames),img_size,img_size,bands); % testFolder=fullfile('.\Cave\test\'); %testOutput=dir(fullfile(testFolder,'*.mat')); %testNames={testOutput.name}; % cd test_Chikusei; % cd test_Houston; cd test_Houston; for i = 1:numel(fileNames) load(fileNames{i},'test'); img_ms = single(imresize(test, factor)); gt(i,:,:,:) = test; ms(i,:,:,:) = img_ms; ms_bicubic(i,:,:,:) = single(imresize(img_ms, 1/factor)); end cd ..; gt = single(gt); ms = single(ms); ms_bicubic = single(ms_bicubic); save('/Users/miaoyuchun/Desktop/superx2/dataset/Houston_x2/Houston_x2.mat','gt','ms','ms_bicubic');