资源简介
TMDS是labVIEW常用的一种数据存储格式,其以二进制的方式进行存储,特点是占用磁盘空间小,且支持数据流高速写盘,常见于高速采集系统。若是需要用Matlab对其进行数据处理,不可避免的需要使用某些方法将TDMS格式文件转换成mat文件,方便处理。
文件详情:
1、其中simple_test.tdms是样本文件。
2、convertTDMS.m是一个转换函数,具体使用方法里面会有英语介绍
常用data=convertTDMS(0,'filename.tdms');
3、simpleConvertTDMS.m也是一个转换函数,这里没有用到,有时间可以尝试;
4、struct2mat.m这是一个结构体转变成mat格式的函数,matlab内部不含此函数;
5、TDMS2MAT.m为编写的主要函数。具体功能里面有介绍。
6、文件夹exampleFiles里面也有样本。
代码片段和文件信息
function [ConvertedDataConvertVerChanNamesGroupNamesci]=convertTDMS(varargin)
%Function to load LabView TDMS data file(s) into variables in the MATLAB workspace.
%An *.MAT file can also be created. If called with one input the user selects
%a data file.
%
% TDMS format is based on information provided by National Instruments at:
% http://zone.ni.com/devzone/cda/tut/p/id/5696
%
% [ConvertedDataConvertVerChanNames]=convertTDMS(SaveConvertedFilefilename)
%
% Inputs:
% SaveConvertedFile (required) - Logical flag (true/false) that
% determines whether a MAT file is created. The MAT file‘s name
% is the same as ‘filename‘ except that the ‘TDMS‘ file extension is
% replaced with ‘MAT‘. The MAT file is saved in the same folder
% and will overwrite an existing file without warning. The
% MAT file contains all the output variables.
%
% filename (optional) - Filename (fully defined) to be converted.
% If not supplied the user is provided a ‘File Open‘ dialog box
% to navigate to a file. Can be a cell array of files for bulk
% conversion.
%
% Outputs:
% ConvertedData (required) - Structure of all of the data objects.
% ConvertVer (optional) - Version number of this function.
% ChanNames (optional) - Cell array of channel names
% GroupNames (optional) - Cell array of group names
% ci (optional) - Structure of the channel index (an index to
% where all of the information for a channel resides in a
% file.
%
%
% ‘ConvertedData‘ is a structure with ‘FileName‘ ‘FileFolder‘ ‘SegTDMSVerNum‘
% ‘NumOfSegments‘ and ‘Data‘ fields‘. The ‘Data‘ field is a structure.
%
% ‘ConvertedData.SegTDMSVerNum‘ is a vector of the TDMS version number for each
% segment.
%
% ‘ConvertedData.Data‘ is a structure with ‘Root‘ and ‘MeasuredData‘ fields.
%
% ‘ConvertedData.Data.Root‘ is a structure with ‘Name‘ and ‘Property‘ fields.
% The ‘Property‘ field is also a structure; it contains all the specified properties
% (1 entry for each ‘Property) for the ‘Root‘ group. For each ‘Property‘ there are
% ‘Name‘ and ‘Value‘ fields. To display a list of all the property names input
% ‘{ConvertedData.Data.Root.Property.Name}‘‘ in the Command Window.
%
% ‘ConvertedData.Data.MeasuredData‘ is a structure containing all the channel/group
% information. For each index (for example ‘ConvertedData.Data.MeasuredData(1)‘)
% there are ‘Name‘ ‘Data‘ and ‘Property‘ fields. The list of channel names can
% be displayed by typing ‘ChanNames‘ in the Command Window. Similarly the list
% of group names can be displayed by typing ‘GroupNames‘ in the Command Window.
% The ‘Property‘ field is also a structure; it contains all the specified properties
% for that index (1 entry in the structure for each ‘Property‘). Any
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 70515 2018-09-28 11:34 ConvertTDMS\convertTDMS.m
文件 34246 2018-09-28 16:46 ConvertTDMS\data5.mat
文件 28776 2014-11-07 06:23 ConvertTDMS\exampleFiles\simple_test.tdms
文件 776 2014-11-07 06:23 ConvertTDMS\exampleFiles\simple_test.tdms_index
文件 170 2014-11-07 06:23 ConvertTDMS\exampleFiles\testFileInventoryList.txt
文件 71792 2018-09-28 15:54 ConvertTDMS\simpleConvertTDMS.m
文件 28776 2014-11-07 06:23 ConvertTDMS\simple_test.tdms
文件 1089 2016-01-06 09:28 ConvertTDMS\struct2mat.m
文件 545 2018-09-28 16:46 ConvertTDMS\TDMS2MAT.m
文件 375 2018-09-28 16:51 ConvertTDMS\使用说明.txt
目录 0 2018-09-28 15:22 ConvertTDMS\exampleFiles
目录 0 2018-09-28 16:48 ConvertTDMS
----------- --------- ---------- ----- ----
237060 12
- 上一篇:下垂控制仿真模型,应用于微网
- 下一篇:三参数威布尔分布线性相关法拟合程序
相关资源
- 三参数威布尔分布线性相关法拟合程
- FW交通均衡求解算法
- matlab打开电脑摄像头动态追踪人脸位
- 捷联惯导matlab程序
- 学生成绩查询系统
- 基于MATLAB的VANET仿真.zip
- PPL锁相环matlab
- 计算SINR的matlab程序,带入参数可以直
- 基于matlab的小车避障仿真
- 最全图像评价性能指标函数matlab
- 图像性能指标matlab版本
- RSSI指纹库
- 图像融合的MATLAB实现
- k均值聚类算方法MATLAB程序
- Matlab+PFH.rar
- 提取水泥路裂缝
- 人群搜索算法SOA的matlab实现
- MATLAB 粒子群图像分割算法
-
MATLAB/Simuli
nk的PMSM的DTC控制仿真 - 粒子群算法matlab含注释
- matlab函数conv_m( xnxhnh )
- 数字基带传输系统MATLAB
- matlab写的指纹识别代码包括图像修复
- 泊松方程MATLAB程序
- 心电信号处理
- MPSK信号调制识别程序
- 神经网络实现调制识别
- 异步电机vf控制matlab仿真模型
- 异步电机带电阻压降补偿的vf控制ma
- 永磁同步电机矢量控制matlab仿真模型
评论
共有 条评论