开发者

Read .daq (Data Acquisition Toolbox for Matlab) file format in python

开发者 https://www.devze.com 2023-04-11 07:20 出处:网络
Anyone know of a way to read in .daq files generated with the Matlab Data Acquisition Too开发者_如何学运维lbox in python?Alternatively, a simple way (using only open-source software) to convert the fi

Anyone know of a way to read in .daq files generated with the Matlab Data Acquisition Too开发者_如何学运维lbox in python? Alternatively, a simple way (using only open-source software) to convert the files to csv or .mat files which can be read by python would be ok.


I am not sure if you have solved this by now or not, but you can generate .mat files from the .daq files easily in matlab using daqread. In the command window:

Data = daqread(mydata.daq);
cd(saveDir)
save('Data','Data')

The Data variable is a .mat file. This can easily be added to a file directory scanning function. Reading into python is also straightforward using the scipy module. From the interpreter for example:

from scipy.io import loadmat
data = loadmat('Data.mat')

There may also be a .daq loading submodule somewhere in scipy, but you would have to look.

Hope this helps!

0

精彩评论

暂无评论...
验证码 换一张
取 消