-
大小: 7KB文件類型: .m金幣: 2下載: 1 次發(fā)布日期: 2021-01-04
- 語言: Matlab
- 標(biāo)簽: wfm??matlab??波形轉(zhuǎn)換??源碼??
資源簡介
用matlab讀取和轉(zhuǎn)換wfm格式波形文件的代碼,適用于安捷倫E443x等系列矢量信號發(fā)生器。
代碼片段和文件信息
function?[out_descript?outdata?timedata]?=?wfm_ascii_dpo(fname?data_start?data_stop)
%?Converts?TSD5/6/7k?and?DPO7k/70k?.wfm?file?to?ASCII?format?
%?with?time?array
%
%?data_start?and?data_stop?input?arguments?are?optional
%?and?can?be?used?to?read?parts?of?file
%
%?To?do:?implement?fast?frame?pixel?maps
%
out?=?[];
if?nargin==0????????
????fname=‘‘;
end
if?isempty(fname)
????[filenamepname]=uigetfile({‘*.wfm‘?‘Tektronix?Waveform?Files?(*.wfm)‘;‘*.*‘?‘All?Files?(*.*)‘}‘Choose?Tektronix?WFM?file‘);
????fname=[pname?filename];
end
%---Open?file
fd?=?fopen(fname‘r‘);
if?fd==-1
????error(‘Problem?opening?file?“%s“‘fname)
end
%---Determine?byte?ordering?then?close?and?reopen?with?proper?byte?ordering
ByteOrder?=?fread(fd1‘ushort‘);
if?ByteOrder==6
- 上一篇:matlab圖論工具箱
- 下一篇:模糊控制代碼matlab
評論
共有 條評論