matlab打开文件很小,无法打开matlab文件

我有一个“.mat”文件,据说包含[30720000×4 double]矩阵(来自加速度计的值).当我尝试在Matlab中使用“导入数据”打开此文件时,出现以下错误:

Error using load

Can't read file F:\vibration_exp_2\GR_UB50n\bearing1\GR_UB50n_1_2.mat.

Error using load

Unknown text on line number 1 of ASCII file

F:\vibration_exp_2\GR_UB50n\bearing1\GR_UB50n_1_2.mat

"MATLAB".

Error in uiimport/runImportdata (line 456)

datastruct = load('-ascii', fileAbsolutePath);

Error in uiimport/gatherFilePreviewData (line 424)

[datastruct, textDelimiter, headerLines]= runImportdata(fileAbsolutePath,

type);

Error in uiimport (line 240)

[ctorPreviewText, ctorHeaderLines, ctorDelim] = ...

filesize是921MB,与我打开的其他文件相同.我也尝试使用python打开文件,但没有成功.有什么建议?我使用MATLAB R2013b.

更多信息:

文件是如何创建的:

%% acquisition of vibration data

% input:

% sample rate in Hz (max. 51200 Hz, should be used as bearing

% faults are high-frequent)

% time in seconds, stating the duration of the measurement

% (e.g. 600 seconds = 10 minutes)

% filename for the file to be saved

%

% examples:

% data = DAQ(51200, 600, 'NF1_1.mat');

% data = DAQ(51200, 600, 'NF1_2.mat');

function data = DAQ(samplerate,time,filename)

s = daq.createSession('ni'); % Creates the DAQ session

%%% Add the channels as accelerometer channels (meaning IEPE is turned on)

s.addAnalogInputChannel('cDAQ1Mod1','ai0','Accelerometer');

s.addAnalogInputChannel('cDAQ1Mod1','ai1','Accelerometer');

s.addAnalogInputChannel('cDAQ1Mod1','ai2','Accelerometer');

s.addAnalogInputChannel('cDAQ1Mod1','ai3','Accelerometer');

%s.addAnalogInputChannel('cDAQ1Mod2','ai0','Accelerometer');

s.Rate = samplerate;

s.NumberOfScans = samplerate*time;

%%% Defining the Sensitivities in V/g

s.Channels(1).Sensitivity = 0.09478; %31965, top outer

s.Channels(2).Sensitivity = 0.09531; %31966, back outer

s.Channels(3).Sensitivity = 0.09275; %31964, top inner

s.Channels(4).Sensitivity = 0.09363; %31963, back inner

data = s.startForeground(); %Acquiring the data

save(filename, 'data');

更多信息:

当我使用简单的文本编辑器打开文件时,我可以看到许多没有意义的字符,但也是第一行:

MATLAB 5.0 MAT-FILE, Platform: PCWIN64, Created on: Thu Apr 30

16:29:07 2015

编辑:

我该如何恢复数据?

我试过了this,但是出现了内存错误.

我也尝试过this,但它没有用.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值