Increasing speed to perform binary read/write operations
古いコメントを表示
Hello everyone. I have a big binary file with a ascii header. In binary part I have a data which I need to change, smooth etc. Read part is looks like:
fid1=fopen(path,'rb','l');
for ii=1:ramp
skbytes=begbytes+skip+(ii-1)*skip+(ix-1)*nx*ncol+(iy-1)*nx;
fseek(fid1,skbytes,'bof');
ax=fread(fid1,[1 1],sh);
aax=double(ax);
yiv(ii,1)=aax;
end
fclose(fid1);
The writing part is the next:
fid=fopen(path1,'r+','l');
for kk=1:ramp
skbytes=begbytes+skip+(ix-1)*ncol*nx+(iy-1)*nx+(kk-1)*skip;
fseek(fid,skbytes,'bof');
fwrite(fid,smy(kk,1),sh);
end
clear kk;
fclose(fid);
The problem is I have 128x128 numbers of these curves. And it is required 3 hours to perform all calculations.
I will be thankful for any idea or help with this.
1 件のコメント
Dima Lotnik
2014 年 11 月 20 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!