1 简介
2 部分代码
function partmatrix=readMatrix(filename,firstPix,numPix,firstEcho,numEchos)% ========================================================================% Chirp Scaling Algorithm - read raw data matrix% April 2005% ========================================================================% Program to extract a part of a SUN raster file% ========================================================================partmatrix=complex(zeros(numEchos,numPix));% open the raster file and determine the file size from the headerfid=fopen(filename,'rb','ieee-be');headerInts=fread(fid,8,'uint32');ras_magic=headerInts(1);ras_width=headerInts(2);ras_height=headerInts(3);ras_depth=headerInts(4);ras_length=headerInts(5);ras_type=headerInts(6);ras_maptype=headerInts(7);ras_maplength=headerInts(8);bytesPerPixel=8;valtype='float32';disp('8 bytes per Pixel')for k=1:firstEcho-1 [curEcho,read_count]=fread(fid,ras_width*2,[valtype,'=>double']);end numzeros=0;nonzeros=0;for k=1:numEchos [curEcho,read_count]=fread(fid,[1,ras_width*2],valtype); if read_count<ras_width*2 error(['read only ',num2str(read_count),' numbers instead of ',... num2str(ras_width*2)]) end im_range=2*firstPix:2:2*(firstPix-1+numPix); re_range=im_range-1; partmatrix(k,:)=(curEcho(re_range)+curEcho(im_range).*j); nonzeros=nonzeros+sum(abs(curEcho)>0); numzeros=numzeros+sum(abs(curEcho)==0);endfclose(fid);return% = end ==================================================================
3 仿真结果
4 参考文献
[1]张丽等. "合成孔径雷达成像处理CS算法." 安徽电子信息职业技术学院学报 13.2(2014):4.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。