• 大小: 2KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-02
  • 语言: Matlab
  • 标签: matlab  地震  segy  读写  

资源简介

地震资料处理解释中用于读取地震segy数据体的matlab程序,适用于初学者。

资源截图

代码片段和文件信息

function seismic_data= readsegyfile(filename)
%   union SI si;//采样点数 
%   union SP sp;//定义采样率 
%   union Data data;//定义数据 
%   union Line line;//线号 
%   union Trace trace;//道号 
%   union X_cor x_cor;//X坐标 
%   union Y_cor y_cor;//Y坐标 
%   Line_num     /最大线号 
%   Trace_num    /最大道号 
fid=fopen(filename‘r‘); 
   if ~fid 
   { 
       disp(‘can‘‘t open file!‘); 
       exit; 
   } ;
   end 
  fseek(fid3220‘bof‘);  %读取采样点数 
  SI=fread(fid1‘int16‘‘b‘) ;
  fseek(fid3216‘bof‘);  %读取采样率 
  SP=fread(fid1‘int16‘‘b‘) ;
  fseek(fid 0 ‘eof‘); %计算总文件字节数 
  file_n=ftell(fid); 
  Tn =(file_n-3600)/(SI*4+240) ; %计算道数 
  fclose(fid);  
 seismic_data=zeros(SITn);   
 fid=fopen(filename‘r‘); 
   if ~fid 
   { 
       disp(‘can‘‘t open file!‘); 
       exit; 
   } ;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1523  2012-05-17 01:41  读写segy文件\readsegyfile.m

     文件       2981  2012-05-17 01:40  读写segy文件\writesegyfile.m

     目录          0  2013-06-04 16:45  读写segy文件

----------- ---------  ---------- -----  ----

                 4504                    3


评论

共有 条评论