如何在MATLAB中读入DZT格式数据
LtdFile9.dzt是一个地质雷达数据,我想对其进行小波分析,我在网上找的一个程序如下,程序运行出来的数据是有问题的,是不是程序哪里有问题,烦请各位高手指教!fid=fopen('LtdFile9.dzt','rb');%打开文件
rh.tag=fread(fid,1,'ushort');
rh.data=fread(fid,1,'ushort');
rh.nsamp=fread(fid,1,'ushort');
rh.bits=fread(fid,1,'ushort');
rh.zero=fread(fid,1,'short');
rh.sps=fread(fid,1,'float');
rh.spm=fread(fid,1,'float');
rh.mpm=fread(fid,1,'float');
rh.position=fread(fid,1,'float');
rh.range=fread(fid,1,'float');
rh.npass=fread(fid,1,'ushort');
rh.create=fread(fid,1,'uint32');
rh.modif=fread(fid,1,'uint32');
rh.rgain=fread(fid,1,'ushort');
rh.nrgain=fread(fid,1,'ushort');
rh.text=fread(fid,1,'ushort');
rh.ntext=fread(fid,1,'ushort');
rh.proc=fread(fid,1,'ushort');
rh.nproc=fread(fid,1,'ushort');
rh.nchan=fread(fid,1,'ushort');
rh.epsr=fread(fid,1,'float');
rh.top=fread(fid,1,'float');
rh.depth=fread(fid,1,'float');
reserved=fread(fid,18,'char');
rh.spp=fread(fid,1,'ushort');
rh.linenum=fread(fid,1,'ushort');
rh.start.x=fread(fid,1,'short');
rh.start.y=fread(fid,1,'short');
rh.end.x=fread(fid,1,'short');
rh.end.y=fread(fid,1,'short');
rh.lineorder=fread(fid,1,'char');
rh.dtype=fread(fid,1,'char');
rh.antname=fread(fid,14,'char');
rh.chanmask=fread(fid,1,'ushort');
rh.name=fread(fid,12,'char');
rh.chksum=fread(fid,1,'short');
rh.variable=fread(fid,896,'char');
Create.sec2=fread(fid,1);
Create.min=fread(fid,1);
Create.hour=fread(fid,1);
Create.day=fread(fid,1);
Create.month=fread(fid,1);
Create.year=fread(fid,1);
rh.comments=setstr(fread(fid,rh.ntext,'char'));
rh.proccessing=fread(fid,rh.nproc,'char');
......
fseek(fid,1024,'bof');
d=fread(fid,,'ushort');
fclose(fid); 您好,请问您问题解决了吗?我也遇到同样的问题,想用matlab读取DZT数据,得到波形的振幅、时间参数,但是不知道如何读取。如果您问题解决了能否告诉我一下,不胜感激。
页:
[1]