hering 发表于 2008-9-8 15:56

如何读取数据全长

请问:我想读取数据全长求瞬时参量。下面程序中的前4句读取全长好像不对,如何改啊,读取的数据为*.dat
请指教

= uigetfile('*.dat', 'open new format VLR data file');
%打开文件并按double类型读取全长
fid = fopen(,'r');
while ~(feof(fid))
= fread(fid,'double');
%xr = ;
x = hilbert(xr');
xi=imag(x);
xr=xr';%转置成和xi一致的行列
a=sqrt(xr.^2+xi.^2);%瞬时幅度求法。
hold on;
subplot(4,1,1);
plot(xr);
title('原数据xr');
subplot(4,1,2);
plot(xi);
title('虚部xi');
subplot(4,1,3);
plot(x);
title('希尔伯特变换x');
subplot(4,1,4);
plot(a);
title('瞬时幅度a');
页: [1]
查看完整版本: 如何读取数据全长