資源簡介
Labview生成的TDMS文件批量轉(zhuǎn)MAT文件代碼,包含convertData.m、simpleConvertTDMS.m、convertTDMS.m三個(gè)文件,讀取同一個(gè)文件夾下所有tdms文件并轉(zhuǎn)為同名的mat文件,親測(cè)可用,另附讀取轉(zhuǎn)換后的mat文件數(shù)據(jù)的說明文檔。
代碼片段和文件信息
%----------------------------------------------------------------
%Navish?Wadhwa?-?v1.5
%This?area?contians?are?the?parameter?which?may?be?changed?every?times
path=‘D:\matlab\matlab_workspace\tdms_20190221\test\‘;
%----------------------------------------------------------------
Files=dir(strcat(path‘*.tdms‘));
lengthFiles=length(Files);
for?i=1:lengthFiles
???%?fopen(strcat(‘E:\work\‘Files(i).name)‘rt‘);
????simpleConvertTDMS(strcat(pathFiles(i).name));
end
fprintf(‘Completed‘‘\n‘);
clear;
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????70483??2014-11-06?14:23??convertTDMS.m
?????文件???????5368??2019-02-21?19:57??simpleConvertTDMS.m
?????文件????????521??2019-02-21?19:49??convertData.m
?????文件????????110??2019-02-23?16:03??讀取tdms_mat數(shù)據(jù).txt
-----------?---------??----------?-----??----
????????????????76482????????????????????4
評(píng)論
共有 條評(píng)論