?? filecombination.m
字號:
function filecombination()
%數(shù)據(jù)格式轉(zhuǎn)換程序。將三個波段象元灰度值寫入一個文件
%disp('Please input the data file[path][filename]:');
%file1=input('the 1 band file name:','s');
%file2=input('the 2 band file name:','s');
%file3=input('the 3 band file name:','s');
%file4=input('the 4 band file name:','s');
%file5=input('the output file name:','s');
file1='g:\lfx\newtask\exportedata\txtsx-1.txt';
file2='g:\lfx\newtask\exportedata\txtsx-2.txt';
file3='g:\lfx\newtask\exportedata\txtsx-3.txt';
file4='g:\lfx\newtask\exportedata\txtsx-total.txt';
fpa=fopen(file1,'rt');
fpb=fopen(file2,'rt');
fpc=fopen(file3,'rt');
fpd=fopen(file4,'wt');
%fpe=fopen(file5,'wt');
while(~(feof(fpa)|feof(fpb)|feof(fpc)))
[band_A,count1]=fscanf(fpa,'%f',[1,1]);
[band_B,count2]=fscanf(fpb,'%f',[1,1]);
[band_C,count3]=fscanf(fpc,'%f',[1,1]);
class=[band_A,band_B,band_C];
fprintf(fpd,'%4d',class);
end
fclose('all');
disp('The programe end');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -