fid=fopen('*.prj,'r');
fseek(fid,8369,'bof'); %跳过header,一共8369个byte
temp = fread(fid,[80,80],'float32'); %reshape 80*80 矩阵
temp=temp';
% image= mat2gray(temp);
image=temp;
批量读取
files = dir([directory_name,'\*.prj']); %<<========找到目录中的所有.prj文件
for n=1:numel(files)fid=fopen([directory_name,'\',...
files(n).name],'r');
fseek(fid,8369,'bof'); %skip the header
temp = fread(fid,[80,80],'float32');
temp=temp';
% image{n}= mat2gray(temp);
image{n}=temp;
fclose(fid)
end