怎么能读出dzt格式的数据,帮我写个程序吧,谢谢大神了
A=importdata(file,space,line)
其中,file是所读取的文件名,space是特定的分隔符,line是一个数字,指文本中字符串文字的行数,如上文的数据中line=4。
此代码的含义是,line行是title,line+1行到end是数据,按特定分隔符space读取数据。此方法可以读取文本在上和数据在下的文件。
A是一个sturct,其中A.data就是所需的数据了。
exapmle:
A=importdata('test.txt',' ',4);%运行即可取得数据A.data
此方法也可以按以下操作获取:
在文件菜单中选择 file/import data,按照提示进行操作至结束。
使用编码器是比较准确的,把脉冲量MOV一个通讯用D寄存器 在触摸屏中用脚本写出脉冲量与步数关系的公式进行转化!可以试一下,可以
探地雷达 GSSI雷达DZT文件格式说明
class DZTstruct{
public:
unsigned short rh_tag; //0xONff where N=rh_nchan-1 (0-15) unsigned short 0-1
unsigned short rh_data; //offset to data (1024*rhnchan); unsigned short 2-3
unsigned short rh_nsamp; //samples per scan (2-65635); unsigned short 4-5
unsigned short rh_bits; //bit per data word (8,16,32,64) unsigned short 6-7
short rh_zero; //binary offset (-128,-32768,etc.) short 8-9
float rh_sps; //scans per second float 10-13 0A-0D
float rh_spm; //scans per mark float 14-17 0E-11
float rh_mpm; //maters per mark float 18-21 12-15
float rh_position; //position (ns) float 22-25 16-19
float rh_range; //range (ns) float 26-29 1A-1D
unsigned short rh_npass; //scans per pass for 2D files unsigned short 30-31 1E-1F
struct DztDateStruct rh_create; //date created struct DztDateStruct 32-35 20-23
struct DztDateStruct rh_modif; //date modified struct DztDateStruct 36-39 24-27
unsigned short rh_rgain; //offset to range gain function unsigned short 40-41 28-29
unsigned short rh_nrgain; //size of range gain function unsigned short 42-43 2A-2B
unsigned short rh_text; //offset to text; unsigned short 44-45 2C-2D
unsigned short rh_ntext; //size of text unsigned short 46-47 2E-2F
unsigned short rh_proc; //offset to processing history unsigned short 48-49 30-31
unsigned short rh_nproc; //size of processing history unsigned short 50-51 32-33
unsigned short rh_nchan; //number of chnnels unsigned short 52-53 34-35
float rh_epsr; //average dielectric constant float 54-57 36-39
float rh_top; //top position in meters float 58-61 3A-3D
float rh_depth; //range in meters float 62-65 3E-41
char reserved[31]; // char reserved[31] 66-96 42-60
char rh_dtype; // char 97 61
/* bits: 7 6 5 4 3 2 1 0
0 unsigned data
1 signed data
0 8-bit int
1 16-bit int
1 32-bit int
1 64-bit int
1 32-bit float
1 64-bit float (USGS extn)
X X X not used
/rh_dtype dose not appear in versions before 5.2
*/
char rh_antname[14]; //antenna name (eg.3105(300MHz) char rh_antname[14] 98-111 62-6F
unsigned short rh_chanmask; //active channels mask unsigned short 112-113 70-71
/* format is 0x530X where X has following bits set;
bit: 7 6 5 4 3 2 1 0
1 1 channel
1 1 2 channel
1 1 1 3 channel
1 1 1 1 4 channel
0 0 0 0 */
char rh_name[12]; //this filename without DOS extension. char rh_name[12] 114-125 72-7D
short rh_chksum; // short 126-127 7E-7F
/* checksum for heaker :
NOTE see program beow for proper way to calculate header checksum
essentiall ,zero out old checksum value (copy it first)
and add up values in the header as if it were 512 unsigned shorts,
then place checksum value into rh_chksum.*/
//128 bytes to here
char variable[896]; //range gain,comments and processing history.variable[896] 128-1023 80-3FF
// 1024 bytes if tightly packed
/* warning! In older DZT files,the rh_data field may not actually be the offset to data in
multi-channel files! It is probably test to read in all the headers which leaves the
file pointer at the start of the first scan or read in the first header to discover the
number of channnels then rewind the file and move the file pointer "number of channels
times sizeof(the header structure)".
*/
public:
DZTstruct();
};
怎么能读出dzt格式的数据,帮我写个程序吧,谢谢大神了
\/\/range (ns) float 26-29 1A-1D unsigned short rh_npass; \/\/scans per pass for 2D files unsigned short 30-31 1E-1F struct DztDateStruct rh_create; \/\/date created struct DztDateStruct 32-35 20-23 struct DztDateStruct rh_modif; \/\/...
学习方法 如何提高学习效率
2.一心不能二用。有许多同学喜欢边学习边听音乐。或许你会说听音乐是放松神经的好办法,但这样容易分散人的注意力,而且长此以往,你将在安静的环境下反而静不下心来学习,所以还是在专心的学习一小时后再全身放松地听一刻钟音乐,这样比带着耳机做功课的效果好多了。3.科学复习功课。实践证明,千...
聂纨优力: struct Bookinfo { char num[20]; //书号 char name[10]; //书名 int jinjia; //进价 int shoujia; //售价 int shuliang; //库存数量 int shouchu; //售出 }; typedef struct Node_book* pNode_book; struct Node_book { struct Bookinfo bookinfo; pNode_...
巨野县19186808576: 如何用c语言将下列txt文件的数据读出来? - ?
聂纨优力: #include int main(){ FILE *fin=fopen("D:\\test1.txt","r"); FILE *fout=fopen("D:\\test2.txt","w"); int x,y,n; while((n=fscanf(fin,"%d%d", &x,&y))==2){ if(y==2) fprintf(fout,"%d\n", y);} fclose(fin); fclose(fout); return 0; }
巨野县19186808576: AUTOCAD如何读取记事本格式的数据作图 - ?
聂纨优力: 就是脚本文件 比如画线:在一个文件中有:Line 0,0 100,0 就可以画线了 你在cad里面输入什么命令都可以写下来,空格表示回车
巨野县19186808576: matlab批量读取dat文件 - ?
聂纨优力: 1、先把数据保存为dat文件.2、使用fscanf命令调用,格式为:fid=fopen('*dat','r');z=fscanf(fid,'%g');status=fclose(fid).(间接导入)
巨野县19186808576: 我想用VB读取dat文件的每一行要怎么弄? - ?
聂纨优力: 用OPEN打开,用LINE读取每一行即可. 代码如下: open "C:\1.dat" for input as #1 '打开C:\1.dat,文件号1 do while not eof(1) '文件循环读取到结束 line input #1,temp '读取一行到temp中 'Text1 = text1 & temp '将这一行放到TEXT控件中.按实现需要 Loop '未结束,继续读取 Close #1 '关闭
巨野县19186808576: 在C#中如何读取二进制文件中的不同类型的数据??? - ?
聂纨优力: 将文件定位到你存整数/字符串的位置,读取出来再转换就行.例如 byte[] buf=new byte[4]; fs.Read(buf,0,4); Console.WriteLine(BitConverter.ToInt32(buf));
巨野县19186808576: LABVIEW怎么读取TXT中的数据? - ?
聂纨优力: 有很多种方法,文件里有表格读取方式,文本文件读取,二进制读取都可以. 表格读取读出来的是数组的格式. 文本读取读出来的是字符串格式. 二进制可以定义你要读的数据类型,读取长度等.以上读出来后你以十六进制显示应该就可以了.
巨野县19186808576: 怎么把一堆结构体数据读取和写入到文本文件 - ?
聂纨优力: 一般有两种方法. 1 以二进制方式打开文件读写 将结构体整体写入或读出 使用fread/fwrite函数. 2 以文本方式读写 将结构体各个元素, 以一定格式,写入到文件,或读出 文件人眼可读. 使用fscanf/fprintf函数.
巨野县19186808576: 怎么从excel中读取数据 - ?
聂纨优力: 数据在Sheet1,就在Sheet2的A1输入=INDEX(Sheet1!A:A,SMALL(IF(Sheet1!$F$1:$F$10000"",ROW(A$1:A$10000),4^8),ROW(1:1)))&""数据公式,输入后先不要回车,按Ctrl+Shift+Enter结束计算,向右填充至G1,再向下填充.但其中E...
巨野县19186808576: 用excel做的图只有图没原始数据了图中的数据怎么能读出来 - ?
聂纨优力: 生米已经做成熟饭了,如果只有图,有个方法可以大致地知道你的数据1、重新按照图中的坐标轴,系列名称,构建一个数据表2、数据表的数据可以根据数轴中坐标,...